Improve error reporting.
This commit is contained in:
@@ -234,7 +234,7 @@ public class BaseLib extends LFunction {
|
||||
}
|
||||
}
|
||||
case ERROR: {
|
||||
vm.error(vm.optstring(1,null), vm.optint(2,1));
|
||||
vm.error(vm.optstring(1,null), vm.optint(2,-1));
|
||||
return 0;
|
||||
}
|
||||
case ASSERT: {
|
||||
|
||||
@@ -234,9 +234,12 @@ public class DebugLib extends LFunction {
|
||||
info.put("linedefined", p.linedefined);
|
||||
info.put("lastlinedefined", p.lastlinedefined);
|
||||
} else {
|
||||
LString name = (si.func!=null?
|
||||
new LString("[Java] "+si.func.toString()):
|
||||
JAVASRC);
|
||||
info.put("what", JAVA);
|
||||
info.put("source", JAVASRC);
|
||||
info.put("short_src", JAVASRC);
|
||||
info.put("source", name);
|
||||
info.put("short_src", name);
|
||||
info.put("linedefined", -1);
|
||||
info.put("lastlinedefined", -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user