Handling exceptions when saving editing conext changes
Handling exceptions when saving editing conext changes
- Subject: Handling exceptions when saving editing conext changes
- From: Atli Páll Hafsteinsson <email@hidden>
- Date: Wed, 25 Mar 2009 13:47:21 +0000
- Thread-topic: Handling exceptions when saving editing conext changes
My problem is the following:
We have a system that allows people to accept changes to their vehicle
registration online and the applications works as follows:
* changes are made to an existing eo-object
* the changes to the editing contex are saved (editingContext.saveChanges())
* an email notifying the user that the changes have been made is sent out
However we've had a scenario when the .saveChanges() failed without the
application noticing and the notification email was sent out even though the
changes where not really made in the database.
What is the best way to catch exceptions when .saveChanges() fails ?
try {
ec.saveChanges();
} catch (Exception e) {
//Do stuff to handle error
}
Or is there a better way ?
Regards,
Atli Páll Hafsteinsson
Fyrirvari á tölvupósti / e-mail disclaimer
http://us.is/Apps/WebObjects/US.woa/wa/dp?id=3776
_______________________________________________
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