Mercurial Hosting > luan
diff src/luan/LuanException.java @ 1121:4cf541886663
check for too many arguments to java fns
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 11 Aug 2017 17:57:52 -0600 |
parents | 6a7c6879158d |
children | e15be31cee92 |
line wrap: on
line diff
--- a/src/luan/LuanException.java Mon Aug 07 23:50:52 2017 -0600 +++ b/src/luan/LuanException.java Fri Aug 11 17:57:52 2017 -0600 @@ -51,7 +51,7 @@ LuanException.class.getMethod( "getJavaStackTraceString" ), this ) ); metatable.rawPut( "__to_string", new LuanJavaFunction( - LuanException.class.getMethod( "getFullMessage" ), this + LuanException.class.getMethod( "__to_string", LuanTable.class ), this ) ); } catch(NoSuchMethodException e) { throw new RuntimeException(e); @@ -64,6 +64,10 @@ throw this; } + public String __to_string(LuanTable ignore) { + return getFullMessage(); + } + public String getFullMessage() { return getLuanStackTraceString(); // return getLuanStackTraceString()+"\n"+getJavaStackTraceString();