• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Handling exceptions when saving editing conext changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Handling exceptions when saving editing conext changes
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Getting Image File's Dimensions
  • Next by Date: [OT] Thank you for letting me participate with NOVA WO
  • Previous by thread: Re: [OT] Parsing legacy fixed width flat files
  • Next by thread: Re: Handling exceptions when saving editing conext changes
  • Index(es):
    • Date
    • Thread