-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add causes for TargetInvocationException in TriggerGlobal #20868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks all script functions that want to pass nil
. (See allies-01
or any other usage of reinforcements for example.)
4f442ee
to
eb8b1ba
Compare
It indeed breaks in allies-01 with the second helicopter. My next approach throws even more
but adds the method signature to the exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OnAllKilled is missing a null check. Also this should get rebased for easier testing
eb8b1ba
to
7972b95
Compare
This addresses #18802 (comment) where a simple typo of a player name causes a large and difficult to read stacktrace.
OpenRA/mods/ra/scripts/campaign.lua
Lines 12 to 15 in 0751b30
will crash when the player is null because the function expects a certain type
OpenRA/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs
Lines 179 to 184 in 0751b30
and the type conversion fails while the script is being loaded, which is also why we don't get line numbers for some reason. This shortens the stacktrace by throwing earlier.