Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send an exception manually with Crittercism?

I'm using the android crittercism library and trying to send a report when I catched an error level exception.

But I can't find the documentation on how to do that. Is this even possible? If so, how?

like image 221
schlingel Avatar asked Apr 04 '12 08:04

schlingel


3 Answers

They temporarily moved the feature into beta. If you e-mail support they'll enable your account for handled exceptions. Below is the sample Android code:

try
{
    throw new Exception("Exception Reason");
}
catch (Exception exception)
{
    Crittercism.logHandledException(exception);
}

Just in case you need it, here is sample code on iOS:

@try {
    [NSException raise:NSInvalidArgumentException
            format:@"Foo must not be nil"];
} @catch (NSException *exception) {
    // Pass it on to us!
    [Crittercism logHandledException:exception]
}
like image 108
user235925 Avatar answered Nov 12 '22 22:11

user235925


I'm the co-founder and CTO of Crittercism. If you send me an awesome email, I can enable it for your account. I'm rob[at] :)

like image 5
crittercismrob Avatar answered Nov 12 '22 21:11

crittercismrob


Crittercism.logHandledException(new Throwable("test"));

You don't actually have to throw the Exception (or Throwable, in this case). It will appear under "Handled Exceptions" on Crittercism website.

like image 2
Asaf Pinhassi Avatar answered Nov 12 '22 21:11

Asaf Pinhassi