comparison core/src/luan/LuanJavaFunction.java @ 249:9737ebb9aaa0

handle LuanExitException git-svn-id: https://luan-java.googlecode.com/svn/trunk@250 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 17 Oct 2014 00:55:15 +0000
parents 0a8e6fdb62f0
children 899253043270
comparison
equal deleted inserted replaced
248:10cc873babee 249:9737ebb9aaa0
95 Throwable cause = e.getCause(); 95 Throwable cause = e.getCause();
96 if( cause instanceof Error ) 96 if( cause instanceof Error )
97 throw (Error)cause; 97 throw (Error)cause;
98 if( cause instanceof LuanException ) 98 if( cause instanceof LuanException )
99 throw (LuanException)cause; 99 throw (LuanException)cause;
100 if( cause instanceof LuanExitException )
101 throw (LuanExitException)cause;
100 throw luan.exception(cause); 102 throw luan.exception(cause);
101 } catch(InstantiationException e) { 103 } catch(InstantiationException e) {
102 throw new RuntimeException(e); 104 throw new RuntimeException(e);
103 } 105 }
104 return rtnConverter.convert(rtn); 106 return rtnConverter.convert(rtn);