Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In the integrated debugger is there an implicit variable for exceptions

I would like to examine the exception in the debugger.

When I have

except on e:exception do

This is trivial, I can just examine the e variable

But, many exception handlers do not have an on e:exception clause.

Is there a special variable such as $exception that can be inspected, or some other method to inspect the exception that does not require changing the source.

I remember doing this (though memory can be faulty), but have not been able find a way to do this.

like image 503
Gary Walker Avatar asked May 17 '19 14:05

Gary Walker


1 Answers

In the System unit there is a function named ExceptObject which returns the exception object that is currently active, or nil if no exception is active. The debugger is able to evaluate this function and so give you the information you need.

like image 93
David Heffernan Avatar answered Sep 20 '22 07:09

David Heffernan