This post is available at http://www.thinkcode.se/blog/2015/11/20/expected-exceptions
There is also a nice little helper library called catch-exception which is here https://github.com/Codearte/catch-exception/tree/2.x
It allows to check for an exception in a single line,
But then you need an extra library to add.
Comment by Peter Kofler — November 20, 2015 @ 22:51
I don’t see adding a dependency as a bad thing. Not if it allows you to write readable and understandable code.
I wasn’t aware of the one you mention.
Comment by Thomas Sundberg — November 21, 2015 @ 10:16
RSS feed for comments on this post. TrackBack URI
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
Create a free website or blog at WordPress.com.