From: Jeff E. <jem...@fr...> - 2010-05-26 19:56:15
|
MyExceptionThrower.java: public class MyExceptionThrower { public static void toss() { throw org.python.core.Py.RuntimeError("my exception"); } } import MyExceptionThrower try: MyExceptionThrower.toss() except RuntimeError, e: print e Brandon Pedersen wrote: > Hey, > > If I want to create an exception type in Java that is available in a > jython script and is a subclass of RuntimeError, how would I do that? > > so, > > try: > something that raises my exception type > except RuntimeError, e: > .... > > would work > > Thanks, > > -Brandon > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |