Nilesh Deokar
Nilesh Deokar

Reputation: 2985

Prevent Toast on handled exceptions ACRA

i am using ACRA for error reporting and everything seems to be fine. i want to send report of handled exceptions as well so i am using

ACRA.getErrorReporter().handleException(e);

but don't want the Toast to appear on the handled exceptions. but want toast on unhandled exceptions! so is there any way to specify this condition?

EDIT

@ReportsCrashes(
        httpMethod = HttpSender.Method.POST,
        reportType= HttpSender.Type.JSON,
        formUri = MFRestConstants.CREATE_ACRA_REPORT,
        mode = ReportingInteractionMode.TOAST,
        resToastText = R.string.msg_toast_text,
        additionalSharedPreferences={"MutterflyAppPref"}
)

Upvotes: 0

Views: 95

Answers (2)

Madhukar Hebbar
Madhukar Hebbar

Reputation: 3173

There is a method called handleSilentException.

Usage: ACRA.getErrorReporter().handleSilentException(e);

Upvotes: 2

varunkr
varunkr

Reputation: 5542

Although I haven't used ACRA before but it is obvious that your mode is set to

mode = ReportingInteractionMode.TOAST

This should display a Toast shouldn't it?

You should simply remove that line because you don't want to notify the user I guess !!

Upvotes: 0

Related Questions