• 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 doesn't catch my exception...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: try catch doesn't catch my exception...


  • Subject: Re: try catch doesn't catch my exception...
  • From: email@hidden
  • Date: Mon, 10 Oct 2005 11:17:32 +0200


In your log, the exception occurs befor the call to saveChanges(). You are validating some place else. Try setting a breakpoint on NSValidation.ValidationException

Pierre

webobjects-dev-bounces+pierre.bernard=email@hidden wrote on 10/10/2005 11:11:54 AM:

> Hi,

> I have the following code
>
>         try

>         {
>             System.out.println("!!!!!!!!!!!Saving changes");
>             ec.saveChanges();
>         }
>         catch (NSValidation.ValidationException exception)
>         {
>             // caught an exception on save.
>             errorsPresent = true;
>             errorString = (String) exception.key();
>             System.out.println("Errors present"+errorString);
>             return null;
>         }
>
> ec is my EditiingContext

>
> I got execption in the run log...

>
> [2005-10-10 11:05:04 CEST] <WorkerThread0> Validation failed on an
> object [null] with keypath = theLocale.nomeCognome and exception:
> The nomeCognome property of locali is not allowed to be null.

> !!!!!!!!!!!Saving changes
>
> but the catch code is totally ignored! :(

>
> anyone can help?

> Thanks _______________________________________________
> 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


**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
 _______________________________________________
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 doesn't catch my exception... (From: Amedeo Mantica <email@hidden>)

  • Prev by Date: try catch doesn't catch my exception...
  • Next by Date: Re: try catch doesn't catch my exception...
  • Previous by thread: try catch doesn't catch my exception...
  • Next by thread: Re: try catch doesn't catch my exception...
  • Index(es):
    • Date
    • Thread