D2W Exception Handling
D2W Exception Handling
- Subject: D2W Exception Handling
- From: David Avendasora <email@hidden>
- Date: Fri, 26 Aug 2011 17:05:58 +0800
Hey D2Wers,
So, I have business logic that executes in the setter of one of my attributes. It's checking to make sure that at least one of a set of objects has a flag set. If you try to remove the flag off the last object it should not allow it and throw and exception.
All that works just fine.
Now I want to catch that exception and display it to the user in a friendly way. Ideally basically the same as how standard validation exceptions are displayed in red at the top of the page in ERModernLook.
I've tried throwing a ValidationException and also tried other exceptions, and either it is ignored with no user feedback (ValidationException), or I get the standard, completely disruptive exception page (for all others).
I've tried to find the extension point to put in my own exception handling, but it's apparently not where I thought it was - ERD2WInspectPage#tryToSaveChanges.
Am I doing it wrong, or just looking in the wrong place?
Dave _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden