We’ve implemented a custom DUT and overridden the Close method. When the test plan is closed, there are cases where errors occur during DUT shutdown and we throw exceptions. However, it seems that these exceptions are not propagated when closing the test plan.
Are these exceptions being swallowed in this scenario?
My goal is to ensure our custom GUI is notified of any exceptions so we can apply specific handling. Is there a recommended way to reliably capture and report these exceptions?
Currently, the only notification you can get is via the log - there will be an error and a stack trace. So you can capture and report the data from the log, but I am guessing you are looking for something else.
MaybeTestPlanRun object should hold the exceptions and other related data.
Could you elaborate a bit on how you would like to use this data?
If you desire is to somehow make the test fail, you need to get the exception to occur before the end of the tapplan, such as, add a step that effectively performs the exception throwing DUT functionality early before the end of the tapplan.