You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggestion: add an SQF command: ADE_onScriptError code, which would call my code passed to it on a script error.
It should pass information about the script error to the callback, such as: file, line number, error text, and the callstack itself in string or array form.
Further things to think of: should it be stackable? What if we register the same code variable multiple times?
The text was updated successfully, but these errors were encountered:
Honestly I'd just do a single handler thing. Otherwise I need to add tracking, and cleanup, and the ability to remove handlers and handler IDs and ugh.
Returns array callstack
[
[file, line, local variables],
[file, line, [["va1",val1], ["var2",val2]]],
...
]
Order will be either top->bottom or bottom->top whatever is easier.
It will still print to RPT.
For the local variables we might want to think about making a deep copy of the array after it was built.
If the local vars reference arrays they might change between error and the onScriptError handler.
Also the handler needs to be spawned as we can't interfere with the script vm while it's processing a error.
Hi!
Since you've asked, I'm making an issue.
Suggestion: add an SQF command:
ADE_onScriptError code
, which would call my code passed to it on a script error.It should pass information about the script error to the callback, such as: file, line number, error text, and the callstack itself in string or array form.
Further things to think of: should it be stackable? What if we register the same code variable multiple times?
The text was updated successfully, but these errors were encountered: