Alex wrote:
> I have recently seen a Delphi application which, when an
> exception occured,
> apart exception message also displayed the unit name and a procedure name
> where exception happened.
>
> Should I believe that application I have seen just uses deatailed "per
> procedure" exception handling.
> Or there is a run time information of this type available in
> Delphi so that
> a universal application-wide exception handler could be set up which would
> be able to display/log names of unit and procedure where
> exception happened.

It's generally done by parsing the contents of a detailed MAP file which was
generated along with your project's EXE and matching that against the
Exception Addr. Once you've got the parsing sorted out, you can also do
things backchain through the Call Stack to give a stack trace which you can
log into an diagnostics file. This can be very handy to determine what
_really_ caused that obscure exception out in the field.

Anyway, .MAP file parsing is what I did to add this and File/Line/Proc
Asserts to my code back in the Delphi 2 days.

TTFN,
  Paul.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to