Search code examples
androiderror-handlingacra

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"}
)

Solution

  • There is a method called handleSilentException.

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