comparison core/src/luan/LuanException.java @ 576:4723d22062ce

remove LuanBit
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 13 Jul 2015 20:38:26 -0600
parents 7c3ad6db8ac3
children 60c549d43988
comparison
equal deleted inserted replaced
575:7c3ad6db8ac3 576:4723d22062ce
9 9
10 private LuanException(String msg,Throwable cause) { 10 private LuanException(String msg,Throwable cause) {
11 super(msg,cause); 11 super(msg,cause);
12 } 12 }
13 13
14 LuanException(LuanBit bit,Object msg) throws LuanException { 14 LuanException(LuanState luan,Object msg) throws LuanException {
15 this( bit.luan.toString(msg), msg instanceof Throwable ? (Throwable)msg : null ); 15 this( luan.toString(msg), msg instanceof Throwable ? (Throwable)msg : null );
16 table.rawPut( "java", this ); 16 table.rawPut( "java", this );
17 table.rawPut( "message", msg ); 17 table.rawPut( "message", msg );
18 table.rawPut( "message_string", bit.luan.toString(msg) ); 18 table.rawPut( "message_string", luan.toString(msg) );
19 for( StackTraceElement ste : bit.stackTrace() ) { 19 for( StackTraceElement ste : luan.stackTrace ) {
20 LuanTable tbl = new LuanTable(); 20 LuanTable tbl = new LuanTable();
21 tbl.rawPut( "source", ste.call.source.name ); 21 tbl.rawPut( "source", ste.call.source.name );
22 tbl.rawPut( "line", ste.call.lineNumber() ); 22 tbl.rawPut( "line", ste.call.lineNumber() );
23 tbl.rawPut( "call_to", ste.fnName ); 23 tbl.rawPut( "call_to", ste.fnName );
24 table.rawPut( table.rawLength() + 1, tbl ); 24 table.rawPut( table.rawLength() + 1, tbl );