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
The purpose of the error beep was to warn the player when their script crashed and isn't in control of the ship anymore. A sort of "autopilot disengaged" warning.
But I'm finding a few circumstances where the beep does not occur on some exceptions. It seems to be exceptions that aren't derived from KOSException, such as when we have an error in our own code that throws a nullref. Regardless of whether the crash was the user's fault or our own, anything that stops the script needs to have the beep.
The text was updated successfully, but these errors were encountered:
Dunbaratu
added
the
bug
Weird outcome is probably not what the mod programmer expected.
label
Dec 18, 2015
I strongly suspect that this issue and #1283 are actually related. It's because these exceptions aren't being sent through the same handler as the KOSExceptions. The exceptions thrown by the compiler are often just generic throw new Exception("yadda yadda"); statements inside the code that TinyPG builds, so they aren't derived from KOSException.
An example of an error that has this problem is divide by zero. This command: print 1 / 0.
will cause C# to produce a runtime exception that isn't derived from KOSException.
The purpose of the error beep was to warn the player when their script crashed and isn't in control of the ship anymore. A sort of "autopilot disengaged" warning.
But I'm finding a few circumstances where the beep does not occur on some exceptions. It seems to be exceptions that aren't derived from KOSException, such as when we have an error in our own code that throws a nullref. Regardless of whether the crash was the user's fault or our own, anything that stops the script needs to have the beep.
The text was updated successfully, but these errors were encountered: