diff src/luan/LuanJavaFunction.java @ 88:6ca02b188dba

add LuanBit to clean up code; add repr(); git-svn-id: https://luan-java.googlecode.com/svn/trunk@89 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 27 Feb 2013 23:50:32 +0000
parents 6db8f286fa6c
children 9aa7d5f20333
line wrap: on
line diff
--- a/src/luan/LuanJavaFunction.java	Wed Feb 27 19:42:09 2013 +0000
+++ b/src/luan/LuanJavaFunction.java	Wed Feb 27 23:50:32 2013 +0000
@@ -74,7 +74,7 @@
 			if( cause instanceof Error )
 				throw (Error)cause;
 			if( cause instanceof RuntimeException )
-				throw new LuanException(luan,LuanElement.JAVA,cause);
+				throw luan.JAVA.exception(cause);
 			if( cause instanceof LuanException )
 				throw (LuanException)cause;
 			throw new RuntimeException(e);
@@ -94,10 +94,10 @@
 				String expected = paramType.getSimpleName();
 				if( arg==null ) {
 					if( paramType.isPrimitive() )
-						throw new LuanException(luan,LuanElement.JAVA,"bad argument #"+(i+1-start)+" ("+expected+" expected, got nil)");
+						throw luan.JAVA.exception("bad argument #"+(i+1-start)+" ("+expected+" expected, got nil)");
 				} else {
 					String got = arg.getClass().getSimpleName();
-					throw new LuanException(luan,LuanElement.JAVA,"bad argument #"+(i+1-start)+" ("+expected+" expected, got "+got+")");
+					throw luan.JAVA.exception("bad argument #"+(i+1-start)+" ("+expected+" expected, got "+got+")");
 				}
 			}
 		}