• 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: NSException and Java Exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSException and Java Exception


  • Subject: Re: NSException and Java Exception
  • From: "R. Tony Goold" <email@hidden>
  • Date: Thu, 11 Oct 2001 10:07:21 -0400

Assuming that refers to Java code called from ObjC code, then what you want is something like:

NS_DURING
// stuff that invokes Java code
NS_HANDLER
NSLog(@"%@ in %s: %@\n", [localException name], __FILE__, [localException reason]);
NS_ENDHANDLER

But if an exception is being thrown within Java code, it should also be possible to catch it within the Java code using the standard try-catch syntax.


Cheers,
Tony


On Wednesday, October 10, 2001, at 07:36 , Cyril Godefroy wrote:

I'm juggling with the tremendously deep documentation on the Java Bride. Please don't tell me not to use Java, it is not an option.
Ly Java code, which works nice on macOSX, raises an exception which I can'
t see.
the doc says:
Exceptions raised within the Java code are caught and transformed into NSExceptions, which can then be handled by your code on the Objective-C side.
Yes, but I have never raised an NSException, and I don't understand how it would work. Got links?

Cyril Godefroy / www.macosxfr.com
Description forthcoming
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >NSException and Java Exception (From: Cyril Godefroy <email@hidden>)

  • Prev by Date: Re: retain count (Re: half-initialized objects during decoding (Re: Persistance))
  • Next by Date: Re: Questions about multithreading
  • Previous by thread: NSException and Java Exception
  • Next by thread: SetWindowFrameAutosaveName:
  • Index(es):
    • Date
    • Thread