Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Try/catch on generated override of @Background and @UiThread hiding exception from global exception handler. #646

@quenio

Description

@quenio

Hello,

The following code shows the generated code of a @UiThread method:

   @Override
    public void logIn() {
        handler_.post(new Runnable() {
            @Override
            public void run() {
                try {
                    LogInFragment_.super.logIn();
                } catch (RuntimeException e) {
                    Log.e("LogInFragment_", "A runtime exception was thrown while executing code in a runnable", e);
                }
            }

        }
        );
    }

Notice that it wraps the super.logIn() method call within a try/catch that logs the exception.

In our application, we use BugSense, which has a global exception handler reporting unhandled exceptions. The try/batch block above prevents BugSense from seeing the exceptions.

We'd like the ability to remove the try/catch wrapping in the generated code perhaps via a new boolean property available in the @background and @UiThread annotations, or via some other mechanism.

Thanks,

  • Quenio

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions