Skip to content

Conversation

FridaTveit
Copy link
Contributor

Changed catch exception to catch specific exceptions.

@coveralls
Copy link

coveralls commented Dec 22, 2016

Coverage Status

Coverage decreased (-0.02%) to 14.128% when pulling b00624f on FridaTveit:FixTodoExceptionInFrameMain into b759460 on oskopek:master.

@FridaTveit FridaTveit force-pushed the FixTodoExceptionInFrameMain branch from b00624f to b3dd3fa Compare December 22, 2016 13:35
@coveralls
Copy link

coveralls commented Dec 22, 2016

Coverage Status

Coverage decreased (-0.02%) to 14.128% when pulling b00624f on FridaTveit:FixTodoExceptionInFrameMain into b759460 on oskopek:master.

@coveralls
Copy link

coveralls commented Dec 22, 2016

Coverage Status

Coverage decreased (-0.02%) to 14.128% when pulling b3dd3fa on FridaTveit:FixTodoExceptionInFrameMain into b759460 on oskopek:master.

Copy link
Owner

@oskopek oskopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

this.parentFrame.recognitionLabel.setText("failed");
ex.printStackTrace();
return;
this.parentFrame.recognitionLabel.setText(recognizedText);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why you moved these two UI calls into the try block? Other than the fact that you can then omit two return statements in the catch blocks. If not, I'd be more comfortable adding the two returns and moving this back out of the try block. It shouldn't really matter execution-wise, but it's cleaner to have as short try blocks as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it was just to omit the two return statements. Okay, will move them back :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

}

private void setFailedAndPrintStackTrace(Exception exception) {
this.parentFrame.recognitionLabel.setText("failed");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Remove all the this calls, if you feel like it :) In the spirit of #41

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@FridaTveit FridaTveit force-pushed the FixTodoExceptionInFrameMain branch from b3dd3fa to 0d1e46e Compare December 23, 2016 15:17
@coveralls
Copy link

coveralls commented Dec 23, 2016

Coverage Status

Coverage decreased (-0.03%) to 14.118% when pulling 0d1e46e on FridaTveit:FixTodoExceptionInFrameMain into 45b7c34 on oskopek:master.

@oskopek oskopek merged commit 419b531 into oskopek:master Dec 23, 2016
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.

3 participants