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
Describe the bug
Scriptrunner provides a way to "GO", "RETRY", or "STOP" when an exception occurs in a script. This is especially helpful with timing dependent telemetry checks or when a script runs into a bad state. However, when a script contains a try/except block anywhere in the file, this feature does not work and scriptrunner will instead have an exception in the control and the only option is to stop the script. This behavior occurs as soon as a try except block has been passed (whether that's executing or just declaring a function with one in it.)
To Reproduce
Steps to reproduce the behavior:
Go to Scriptrunner
Create new python file with the following:
# Before try block this exception will be able to be passed with "GO"raiseExceptiondeffunction_with_try_block():
try:
passexceptException:
pass# After try block this exception will not be able to be passed with "GO"raiseException
Save file and run the script
First exception is raised and user is able to select "GO"
Second exception is raised and user is unable to select "GO" or "RETRY," only "STOP" (additional error appears in the logs)
Expected behavior
Ideally the cosmos exception handling should be the default exception handler and additional try/except blocks should be added to the exception handling stack as they are entered. Raised exceptions should bubble up through this stack until one of try/excepts or ultimately cosmos handle it. For example:
# This will be handled by the cosmos exception handlerint("not an int")
# This will be handled by the explicit try/except in the script. try:
int("not an int")
exceptValueError:
print("error")
Screenshots
Script control options available with the first exception
Script control options are not available after the function definition, and additional exception in control statement is displayed in logs.
Environment:
OS: Windows 11
OpenC3 COSMOS Version 6.1.0
Browser Firefox
The text was updated successfully, but these errors were encountered:
Describe the bug
Scriptrunner provides a way to "GO", "RETRY", or "STOP" when an exception occurs in a script. This is especially helpful with timing dependent telemetry checks or when a script runs into a bad state. However, when a script contains a try/except block anywhere in the file, this feature does not work and scriptrunner will instead have an exception in the control and the only option is to stop the script. This behavior occurs as soon as a try except block has been passed (whether that's executing or just declaring a function with one in it.)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ideally the cosmos exception handling should be the default exception handler and additional try/except blocks should be added to the exception handling stack as they are entered. Raised exceptions should bubble up through this stack until one of try/excepts or ultimately cosmos handle it. For example:
Screenshots
Script control options available with the first exception
Script control options are not available after the function definition, and additional exception in control statement is displayed in logs.
Environment:
The text was updated successfully, but these errors were encountered: