Robust Lua error handling and quarantining#33
Draft
nevkontakte wants to merge 1 commit intoX-Friese:masterfrom
Draft
Robust Lua error handling and quarantining#33nevkontakte wants to merge 1 commit intoX-Friese:masterfrom
nevkontakte wants to merge 1 commit intoX-Friese:masterfrom
Conversation
Functions in the runtime namespace provide a robust way to catch and handle errors triggered by Lua scripts. In future all call to Lua will go through this API, rather than low-level C API. The new API can unwind Lua call stack and make a reasonable guess for which script is responsible for triggering an error and quarantine it automatically. For now, it is mostly in proof-of-concept state, handling errors at script loading stage and in do_often() code. Some functionality is missing and reporting errors to user is done through Dev Console only. I also did a bunch of refactoring to the code I had to change, hopefully making it easier to understand and use more modern C++.
Collaborator
|
I sure wish I could better understood what you are trying to do so we could improve the error handling. Every once in a while I look at your code but I am afraid it just goes over my head. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code is in a very draft stage, I'm opening this PR so that you could see the direction I'm going for.
In short my goal can be summarised as
LuaIsRunningflag should be used in very few places. The rest should use Lua's native error handling or C++ exceptions for handling errors.