Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Remove try/catch block on @Background/@UIThread methods#682

Merged
DayS merged 2 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
tbruyelle:646_PropagateThreadExceptionstbruyelle/androidannotations:646_PropagateThreadExceptionsCopy head branch name to clipboard
Jul 28, 2013
Merged

Remove try/catch block on @Background/@UIThread methods#682
DayS merged 2 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
tbruyelle:646_PropagateThreadExceptionstbruyelle/androidannotations:646_PropagateThreadExceptionsCopy head branch name to clipboard

Conversation

@tbruyelle

Copy link
Copy Markdown
Contributor

Related to issue #646 and add fix for PR #677

Because the exception is now propagated, there is no need of catching
it.

Generated code :

    @Override
    public void backgroundThrowException() {
        BackgroundExecutor.execute(new BackgroundExecutor.Task("", 0, "") {


            @Override
            public void execute() {
                ThreadActivity_.super.backgroundThrowException();
            }

        }
        );
    }

Notes

  • The surroundWithTryCatch method is now unused, don't know if I have to remove it or not.

Because the exception is now propagated, there is no need of catching
it.
@DayS

DayS commented Jul 28, 2013

Copy link
Copy Markdown
Contributor

As catching an exception is not in the AA philosophy, I think you should remove it

@tbruyelle

Copy link
Copy Markdown
Contributor Author

done 4a6a77b

DayS added a commit that referenced this pull request Jul 28, 2013
Remove try/catch block on @Background/@UIThread methods
@DayS DayS merged commit 0fb5ca3 into androidannotations:develop Jul 28, 2013
@DayS

DayS commented Jul 28, 2013

Copy link
Copy Markdown
Contributor

Great 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.