> On Nov 23, 2017, at 1:37 PM, Ragu Vijaykumar <[email protected]> wrote:
> 
> Our test was to add some blatantly wrong code in a view function and run it 
> on the XCode debugger. Below is the snippet of code. When running in the 
> debugger, nothing crashes and no errors are generated. The app continues to 
> function normally, but there is no data pulled into the tableview (since the 
> view function has code that would generate the exception).

The map function is called within an @try…@catch block, to handle exceptions 
from application code. The exception will get logged as a warning. It shouldn’t 
cause a crash.

> The query is passed a pointer to an NSError* object, but that error object is 
> still nil. 


The map function is run while indexing the database, which is technically not 
the same thing as running the query. It often happens that running a query 
triggers indexing, if the index wasn’t up to date, but the two processes are 
loosely coupled, so it’s not always straightforward to pass an error up to the 
query call.

Of course you can add your own @try…@catch block inside your map block if you 
want to check for exceptions yourself.

> Is there any way to propagate errors to the app so we can find issues? We do 
> have logging enabled via the following code, but still do not see any 
> relevant lines printing out.

That’s odd, because warnings always get logged. Could you create a test case to 
reproduce this?

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/31865CD8-A26F-4943-BA4C-B14546147DC5%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to