• 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
Re: try catch not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: try catch not working


  • Subject: Re: try catch not working
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 13 Jun 2005 10:20:55 -0700

I'd guess that you are getting a different exception. saveChanges can throw other exceptions. EOGeneralAdaptorException for errors reported at the database level is one that comes to mind.

Chuck


On Jun 13, 2005, at 10:08 AM, Amedeo Mantica wrote:

Hi

I have thie piece of cone for inserting ad object from my editing context into the database

        try
        {
            System.out.println("Saving Object");
            ec.saveChanges();
        }
        catch (NSValidation.ValidationException ve)
        {
            // caught an exception on save.
            System.out.println("Errors present");
            errorsPresent = true;
            errorString = (String) ve.key();
            return null;
        }

worked very well, but now with Xcode 2.1 if there are errors in the savechanges routine WO display me the expeption error intead to go to the catch code.
Does anyone have suggestion?
Thanks


AMEDEO _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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


References: 
 >try catch not working (From: Amedeo Mantica <email@hidden>)

  • Prev by Date: Re: try catch not working
  • Next by Date: Xcode 2.1 - local
  • Previous by thread: Re: try catch not working
  • Next by thread: Xcode 2.1 - local
  • Index(es):
    • Date
    • Thread