Implement class StackContext as part of LuaScript which will push an error handling function onto the stack and recover the previous stack on destruction.
This will ensure that the stack will be properly cleaned up and also provide useful error information to the user.
Implement class
StackContextas part ofLuaScriptwhich will push an error handling function onto the stack and recover the previous stack on destruction.This will ensure that the stack will be properly cleaned up and also provide useful error information to the user.