News for hackers. Stuff that matters.
Re:Replacing Throwing Exceptions with Notification in Valida... by blueflow on Saturday December 13, 2014 @06:10PM (#8746834)
> if a failure is expected behavior, then you shouldn't be using exceptions Just from the abstract view - isn't 'exception' defined as unexpected event? Or am i missing something?
Re:Replacing Throwing Exceptions with Notification in Valida... by Retra on Saturday December 13, 2014 @08:46PM (#8747180)
Exceptions are not for unexpected behavior, but for state that is inconsistent with your model. Unexpected behavior is generally called an "error" or a bug. You can't code around the unexpected.