-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Q] Catch lua error #88
Comments
Additionally how do I set a glob val that is == nil / empty? |
Never mind |
@trsh you're gonna post a good question, figure it out, then leave us hanging? what'd you find?? |
@mitchtbaum for the 1st question:
For the nil question, my answer is just not to set that Global. And it will be nil, as all undefined variables in Lua. |
@trsh these say to use xpcall. is that another approach? what about try-catch error handling exception pattern? are these ever used together? I posted an issue in the framework I'm working on. if you're also interested in actix-web and lua, then I'd love your input. |
@mitchtbaum sorry, I can tell nothing more. My approach is working for my project, so i dont investigate further. And I use actix-web. |
@mitchtbaum one thing that I wan't, and could not figure out, is how to get |
I'm not sure I understand. what is the goal? to pipe stdout back to Rust? I thought you already showed you can get the error object. Does throwing an exception give different debug output? |
I think if it happens anywhere in my code base, it'd be here that receives strings from Lua to use in Rust code, I think evidenced by its use of we're not using it anymore, since we switched to using log.lua |
Throwing an exception returns Error to Rust, that includes the error lines. Ok result return whatever you return with "return xx". So Print invisible. |
Can I catch and Faulty lua code, and get some stack trace without panicking the main Rust code?
The text was updated successfully, but these errors were encountered: