From: Ype K. <yk...@xs...> - 2001-09-23 08:57:22
|
Robert, >On Sat, 22 Sep 2001, Frank Cohen wrote: >> Thanks for the great reply. Lots of useful information here. I would >> appreciate seeing your example code too. >> >> Do I have it right that Jython can't catch Java exceptions? > >Actually, Jython does catch Java exceptions. e.g.: > >>>> import java >>>> try: >... raise java.lang.UnknownError, "Java error raised" >>>> except java.lang.UnknownError: >... print "Java exception caught" >... >Java exception caught >>>> > >It catches it just the same if a Java class throws it. Could you try java.lang.OutOfMemError, too? It's already some versions of jython ago that I could not catch it in actual out of memory situations. Ype. |