Reputation: 87
I've implemented lua in my c++ project but right now it writes all errors and syntax errors to the console. Is there way to set a custom function in c++ to receive the errors instead?
Upvotes: 1
Views: 362
Reputation: 265190
Run your Lua code using lua_pcall and retrieve your errors from the result.
Upvotes: 2