Raygun4iOS: unwanted exception using function sendError
Paul
Posted on
May 30 2016
Unwanted exception using Raygun4iOS in Swift.
- XCode 7.3.1
- Raygun4iOS 2.2.0
- CocoaPods 0.39.0
To reproduce, go to the Breakpoint navigator
, add an Exception Breakpoint
and call this method:
(Raygun.sharedReporter() as! Raygun)
.sendError(error, withTags: [], withUserCustomData: [:])
When I do, I hit the breakpoint. I can then Continue program execution
but it's a little bit annoying having to do this every time you hit an error.
Nothing really relevant in the log traces:
Cheers!
Jason Fauchelle
Raygun
Posted on
May 31 2016
Hi Paul,
I wasn't able to reproduce the issue, possibly due to not setting up the breakpoint correctly. I do however think I know the cause of the exception. The sendError function takes the information from the error, puts it into an NSException, then throws and catches it. This is to generate a stack trace to be sent to Raygun so that you know where in your code the error was manually sent from.
This is functionality requested by the person who asked for the sendError function. We plan to keep it this way, but I have noted down possibly adding a function overload in the next version that lets you disable the stack trace functionality. This would mean not throwing/catching the exception. We do not have a time frame of when the next version will be released sorry.
Thanks for your feedback on this. I haven't come across this issue before but understand it would be annoying to manually continue program execution every time.
-Jason Fauchelle
Paul
Posted on
May 31 2016
Thank you very much for your response, I will continue to use the send
function then, not a problem at all.
Cheers,
Paul Salmon