I am using luajava. When lua execute wrong,I cannot catch exception,and then jdk crashed. So how can I catch exception in lua?I just catch error like this(java code):
LuaState ls = LuaStateFactory.newLuaState();
ls.openLibs();
String luaPath = "test.lua";
int isCompile = ls.LdoFile(luaPath);
if(isCompile==0){
log.info(luaPath+" compile success!");
}else{
log.info(luaPath+" script does not exist or compile failed!");
}
When lua has internal error,I cannot catch. So how can I catch exception in lua?
When lua executes error, JVM shows an error, not an exception. How can I catch the error in Java?