Crashing when I try to send an exception [iOS]

Bruno

Posted on
Aug 22 2014

I’m testing raygun for the first time on our iOS app, but it’s crashing when I try to send an exception.

This is what I’m trying to do:

[[Raygun sharedReporter] send:[NSException exceptionWithName:@“Error 1" reason:@"error" userInfo:@{@"error" : @“my error"}]];

I also tried this:

@try { NSException *exception = [[NSException exceptionWithName:@“Error 1" reason:@"error" userInfo:@{@"error" : @“my error"}]; [[Raygun sharedReporter] send:exception]; } @catch (NSException *exception) { }

It is crashing at [NSURLConnection sendAsynchronousRequest:queue:completionHandler:];

If you could just let me know if that is actually a bug or if I’m doing something silly that would be great.

Cheers, Bruno


Jason Fauchelle

Raygun

Posted on
Aug 27 2014

Hello Bruno

Sorry for the delay, we'll be looking into this soon.

-Jason Fauchelle


Jason Fauchelle

Raygun

Posted on
Aug 27 2014

Hello Bruno

I've tried both of the code snippets you posted and they are both working as expected at our end (after I resolved the compile time errors).

Make sure that before you attempt sending an exception, you set up your Raygun app api key. The api key is displayed when you create an application on your Raygun account, or you can view it in the Application Settings.

[Raygun sharedReporterWithApiKey:@"YOUR_APP_API_KEY"];

It may also be worth getting the latest version if you haven't done so already: https://raygun.io/raygun-providers/ios

If it still isn't working, please send a repro project and we'll look into this issue for you further.

-Jason Fauchelle


Reply