Hi
I am reading a file from the assets folder, with an existing file all is good. Thing is, I specified an non-existing file, so that I can trap if an error happens, yet the "res" returns content and thus an error is never returned. Is there a way around this?
File Does not exist response.
I am reading a file from the assets folder, with an existing file all is good. Thing is, I specified an non-existing file, so that I can trap if an error happens, yet the "res" returns content and thus an error is never returned. Is there a way around this?
B4X:
Try
Dim res As Object
Dim err As Object
Dim ab As BANanoPromise = BANano.GetFileAsArrayBuffer(assetFile, Null)
ab.ThenWait(res)
Log("buffer")
Log(res)
ab.ElseWait(err)
Log("error...")
Log(err)
ab.End
File Does not exist response.