Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the codes out of the finally block #1926

Merged
merged 1 commit into from
Dec 9, 2014

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Dec 4, 2014

Found there were complex codes in the finally block. It's a bad practice because:

  • The return statement in the finally block will swallow the exception.
  • The codes in the finally block will continue to run even if any exception happens in the try block. If the finally block contains complex codes, they may continue to run for long time or throw an exception which will override the initial one. It will make us hard to debug and find the real problem.

Therefore I moved them out of the finally block in this PR.

benjchristensen added a commit that referenced this pull request Dec 9, 2014
Move the codes out of the finally block
@benjchristensen benjchristensen merged commit 5b736f6 into ReactiveX:1.x Dec 9, 2014
@zsxwing zsxwing deleted the fix-merge-finally branch December 9, 2014 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants