Mercurial Hosting > luan
diff core/src/luan/LuanJavaFunction.java @ 578:60c549d43988
remove LuanState.exception()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 14 Jul 2015 17:40:48 -0600 |
parents | 7c3ad6db8ac3 |
children | cdc70de628b5 |
line wrap: on
line diff
--- a/core/src/luan/LuanJavaFunction.java Mon Jul 13 20:53:02 2015 -0600 +++ b/core/src/luan/LuanJavaFunction.java Tue Jul 14 17:40:48 2015 -0600 @@ -94,7 +94,7 @@ throw (Error)cause; if( cause instanceof LuanException ) throw (LuanException)cause; - throw luan.exception(cause); + throw new LuanException(luan,cause); } catch(InstantiationException e) { throw new RuntimeException(e); } @@ -131,10 +131,10 @@ expected = fixType(paramType.getSimpleName()); if( arg==null ) { if( paramType.isPrimitive() ) - throw luan.exception("bad argument #"+(i+1-start)+" ("+expected+" expected, got nil)"); + throw new LuanException(luan,"bad argument #"+(i+1-start)+" ("+expected+" expected, got nil)"); } else { String got = fixType(arg.getClass().getSimpleName()); - throw luan.exception("bad argument #"+(i+1-start)+" ("+expected+" expected, got "+got+")"); + throw new LuanException(luan,"bad argument #"+(i+1-start)+" ("+expected+" expected, got "+got+")"); } } }