Skip to main content
6 events
when toggle format what by license comment
Apr 26, 2014 at 9:55 comment added Maarten Bodewes @Eonil ...or Option<T>
Dec 4, 2013 at 5:15 comment added Eonil Expected = control flow = anti-pattern of exception. Exception shouldn't be used for control flow. If it's expected to produce error for specific input, then it just be passed a a part of return value. So we have NAN or NULL.
May 31, 2011 at 20:17 comment added kevin cline @qes: It makes sense to raise an exception whenever a function is unable to calculate a value, e.g. double Math.sqrt(double v) or User findUser(long id). This gives the caller the freedom to catch and handle errors where it is convenient, instead of checking after each call.
May 31, 2011 at 16:09 comment added quentin-starin If the exception is expected, it isn't really an exception. "NoRowsException"? Sounds like control flow to me, and therefore a poor use of an exception.
May 31, 2011 at 5:14 history edited MattyD CC BY-SA 3.0
added example
May 31, 2011 at 5:06 history answered MattyD CC BY-SA 3.0