Closed jiangliu23 closed 3 years ago
The way it works currently is the way it is intended to work, the key part of the documentation you quote is "...suppress all simulator log output...".
So OrigenSim monitors log ouput produced by the simulator and if it is logging errors then it will cause the simulation to be considered a failure.
The Origen log is not monitored in the same way, which is consistent with how Origen works in general - sending output to the error log does not automatically mean that any operation is considered a failure currently.
If you want to induce a failure from Origen application code then the way to do it currently is either to raise a Ruby error, or allow it to continue but fail at the end of the simulation by using OrigenSim.error
which is documented here - https://origen-sdk.org/origen/guides/simulation/patterns/#Creating_Simulation-Only_Assertions
The way you thought it should work could of course be added, but that is potentially a breaking change that would need to be more widely discussed.
Thanks for the explanation.
The error handling description from the OrigenSim's website is incorrect, OrigenSim would not fail if the user does the following, but according to the documentation they should:
The way that seems to trigger OrigenSim failure is through the use of OrigenSim.error method and not neccesarily related to what the content of the log output is. Please help update the OrigenSim website to document how users should be logging simulation errors and how OrigenSim handles different types of ERROR messages.
from OrigenSim web documentation:
"By default, OrigenSim will automatically suppress all simulator log output except for any lines that contain the text WARNING or ERROR (case insensitive); both of these will be logged to the console and any occurrences of the latter will also make the result of the simulation be classed as a FAIL."