This sure is a newbie question ... I have obviously not figured out how to
catch an NSRangeException. The following try-catch doesn't seem to work:

   public EOEnterpriseObject trInfoV () {
      EOFetchSpecification trSpec =
         new EOFetchSpecification("TRInfo", null, null);
      NSArray trArr =
         this.defaultEditingContext().objectsWithFetchSpecification(trSpec);
      try {
         return (EOEnterpriseObject)trArr.objectAtIndex(0);   // row 1
      }
      catch (Exception e) {     // NSRangeException
         System.out.println("*** catch NSRangeException: " + e.getMessage());
      }
      return null;      // ???
   }

In my first attempt, I tried "catch (NSRangeException e) {...", but I
couldn't figure out the right com.apple.yellow thing to import.

Any hints?

/Jon

---------------------------------------------------------------------------
Jon Kleiser / ADB-seksjonen / USIT / University of Oslo / Norway
Mail: [EMAIL PROTECTED] / Tel: +47-22 85 28 04 / Fax: +47-22 85 29 70
---------------------------------------------------------------------------

Reply via email to