CS2103AUG2017-W14-B2 / main

Augustine
https://nus-cs2103-AY1718S1.github.io/addressbook-level4
MIT License
0 stars 4 forks source link

code quality comments for wenzongteo #160

Open okkhoy opened 7 years ago

okkhoy commented 7 years ago

image

image

image

image

@wenzongteo FYA

wenzongteo commented 7 years ago

@okkhoy oops i was having the idea that i should throw an assertion error in an empty else as it means it should not enter that else statement. Will remove that empty else statement.

I have a question with regards to catching of exceptions? should i also include an catch all exceptions (catch Exception e) at the end of the each try statement to prevent any possible errors that i did not expect from occurring?

okkhoy commented 7 years ago

WRT exceptions: as long as you know or can think of what you can do for an un-planned exception, you can catch Exception e. The other way to think is let that un-planned exception propagate higher up in the code to some place where it can be handled