(iOS) Manually throw Exceptions?
geoff
Posted on
May 30 2014
I'm very new to Raygun and I have a question about iOS Exception handling. I have the framework installed into an existing app, and it is working great for unexpected exceptions that are thrown. My question is, is there a way to manually log exceptions or errors without actually throwing an NSException?
I have a few places in my application where I would like to log custom events that I am not currently throwing an NSException. Like most apps, mine has a number of web services that it uses to communicate with the server (web services that I do not maintain or update). Right now my app just notifies the user that getting information from the web service response has failed (I am passed some gobbledegook .NET error), but I would like to manually send an error to Raygun so I am aware of the web service problem without actually throwing an exception inside of my app. Am I thinking about this wrong? I've tried throwing my own exceptions, but I don't want my app to crash so I have them inside of a try / catch. How can I manually send exceptions to Raygun from inside of a try / catch (like I do in Javascript)?
Jason Fauchelle
Raygun
Posted on
May 30 2014
Hello Geoff
Unlike all our other providers, the iOS provider does not yet have methods to manually send exceptions. This is something that we are certainly planning to look at adding within the next month. I will get back to you when this is available.
-Jason Fauchelle
geoff
Posted on
May 30 2014
Jason,
That's great news! Thanks for getting back to me. FYI - I'm absolutely loving your service!
Best Regards,
Geoff
Jason Fauchelle
Raygun
Posted on
Jul 18 2014
Hello Geoff
Sorry for the delay with this. The latest version of Raygun4iOS (v 1.4.0) now supports manually sending NSException objects by using the Raygun.send method. Please let us know if you have any questions about this.
Instructions to get the latest version is here: https://raygun.io/raygun-providers/ios
-Jason Fauchelle