I am developing a phonegap application for iOS devices. I also integrated bugsense for iOS.
I am using window.onError from javascript to catch errors and then use a Webview delegate method to perform exception handling. This is where I create a custom NSException object and use BUGSENSE_LOG() method to log exception. But that is not working. This is the error that I get:
BugSense --> Server responded with status code: 500
This is my code:
NSDictionary *myDictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"Source", @"Phonegap ios", nil];
NSException *exc = [NSException exceptionWithName:@"MyException" reason:completeMessage userInfo:myDictionary];
//[exc raise];
BUGSENSE_LOG(exc, @"Tag");
I have turned the debugger off and I am making a release build. I have checked my settings as well and everything seems as per the guidelines given on the Bugsense official website.
Thanks in advance for your replies.
WELL .. I was able to find the solution to my own problem. All I did was instead of creating the NSException object, I raised an exception, caught it and then logged it. Surprisingly it worked..
@try {
[NSException raise:@"MyException" format:@"%@,%@,%@",message,url,lineNumber];
}
@catch (NSException *exception) {
BUGSENSE_LOG(exception, @"tag");
}