validateKEY and exceptions
validateKEY and exceptions
- Subject: validateKEY and exceptions
- From: Dale Stanbrough <email@hidden>
- Date: Mon, 06 Oct 2003 22:01:58 +1000
I've written an app to learn about validation of keys.
The validation methods for a string get called after the component's
awake method, but before
takeValuesFromRequest.
If I find an error in one a data value, I can raise an
NSValidation.ValidationException, but this gets
sent back to the WO Framework. All I get to see is the following
message appearing in the console...
<WorkerThread1> Validation failed on an object [null] with keypath =
author.lastName and exception: validateForInsert - Last name blank
where "validateForInsert - Last name blank" is a string I insert into
the exception.
Is there any way to catch the exception and allow it to affect the
processing of the component (the application logic)? The only
other solution I can see is to manually set a "errorsFound" boolean
that is cleared in the components awake() method, and tested later.
If you can't catch the exception is there any point in raising it? It
would seem to have no discernable effect if you can't intercept it.
Dale
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.