10

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?

schlingel
  • 8,560
  • 7
  • 34
  • 62
  • 4
    Please elaborate why you downvoted. It kinde sucks if I get a downvote without an explanation. I have no chance in removing the error if I don't know what it is. – schlingel Apr 04 '12 at 09:00

3 Answers3

9

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]
}
user235925
  • 838
  • 1
  • 8
  • 11
  • do you know the maximum size of the string you can use in association with the exception? i.e. if i want to upload a report, like a file with many lines to a particular crash. – David T. Jul 01 '14 at 04:23
  • Is there any way to achieve same using "new relic" ? – Brajesh Kumar Mar 20 '15 at 11:44
5

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] :)

crittercismrob
  • 419
  • 2
  • 8
  • I'm glad to see the CTO is so hands on with questions from his user base. (But this should probably have been a comment in the original post.) – Diederik Jan 24 '13 at 05:57
2
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.

Asaf Pinhassi
  • 15,177
  • 12
  • 106
  • 130