Mercurial Hosting > luan
comparison core/src/luan/LuanException.java @ 484:2e17b54e69d9
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 11 May 2015 21:22:25 -0600 |
parents | 5d4a78c93383 |
children | 8dcf9e12446b |
comparison
equal
deleted
inserted
replaced
483:0db144c98564 | 484:2e17b54e69d9 |
---|---|
11 super(msg,cause); | 11 super(msg,cause); |
12 } | 12 } |
13 | 13 |
14 LuanException(LuanBit bit,Object msg) throws LuanException { | 14 LuanException(LuanBit bit,Object msg) throws LuanException { |
15 this( bit.luan.toString(msg), msg instanceof Throwable ? (Throwable)msg : null ); | 15 this( bit.luan.toString(msg), msg instanceof Throwable ? (Throwable)msg : null ); |
16 if( msg instanceof LuanException ) | |
17 throw new RuntimeException(); | |
18 table.rawPut("message",msg); | 16 table.rawPut("message",msg); |
19 for( StackTraceElement ste : bit.stackTrace() ) { | 17 for( StackTraceElement ste : bit.stackTrace() ) { |
20 LuanTable tbl = new LuanTable(); | 18 LuanTable tbl = new LuanTable(); |
21 tbl.rawPut( "source", ste.call.source.name ); | 19 tbl.rawPut( "source", ste.call.source.name ); |
22 tbl.rawPut( "line", ste.call.lineNumber() ); | 20 tbl.rawPut( "line", ste.call.lineNumber() ); |