View Single Post
07-06-2009, 07:10 PM
Join Date: Apr 2007
As soon as any
statement is made, the execution stops immediately and moves to the appropriate
statement or an Exception handler if there is one. It just wouldn't make sense to have a scenario where one wants to throw an exception yet keep the current flow of the code going (for more validation checks, as in your example).
Rather than throwing an exception
as soon as
a validation problem is identified, it sounds like you will want to collect the errors (if there are any) together during the validation process and only after the validation tests are all complete then throw an exception to be caught elsewhere.
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe