-
Notifications
You must be signed in to change notification settings - Fork 114
Fixed TODO in FrameMain. #37
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
Fixed TODO in FrameMain. #37
Conversation
b00624f
to
b3dd3fa
Compare
There was a problem hiding this 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); |
There was a problem hiding this comment.
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 return
s 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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
…ssary this. statements.
b3dd3fa
to
0d1e46e
Compare
Changed catch exception to catch specific exceptions.