S
Sam Martin
hi all,
I'm looking for your opinions on whether to validate and subsequenly throw
exceptions based on the data set() to an object's property or whether you
should do it on say a Save() method.
For example, I have a series of Business Components that have fairly
straight forward properties, and methods to Save().
Should I...
a) Check the validity of each property when it's set and throw an exception
if invalid
or
b) Wait until the Save() method is called for the object, then validate and
throw exceptions where application
My concern is having to put a try block round every bit of code that tries
to set the propery of one of my business objects...
you thoughts....
TIA
Sam Martin
I'm looking for your opinions on whether to validate and subsequenly throw
exceptions based on the data set() to an object's property or whether you
should do it on say a Save() method.
For example, I have a series of Business Components that have fairly
straight forward properties, and methods to Save().
Should I...
a) Check the validity of each property when it's set and throw an exception
if invalid
or
b) Wait until the Save() method is called for the object, then validate and
throw exceptions where application
My concern is having to put a try block round every bit of code that tries
to set the propery of one of my business objects...
you thoughts....
TIA
Sam Martin