A free exception logging for Delphi with additional information like source files, procedure names, line numbers, exception messages, etc.(c) Jiri Hajek 2003-2005
When you include this unit in your project, all exceptions that happens at run-time are automatically logged together with exception message, information about source of the exception and call stack content together with source files and line numbers information.
This unit was tested under Delphi 7, it would probably work under other Delphi versions as well, but it might need some modifications in some magic constants in the code below.
You can use this unit for any purpose, even commercial, as long as you leave this header here. Author cannot be blamed for any problem with this unit. If you don't agree, don't use it.
Download the unit ExceptLog.pas.
This is a sample output after a single line
was added to OnFormCreate event of the main form of a project.
New exception: Delphi exception, type Exception, message: Here! Exception code: 250477278 Exception flags: 3 Number of parameters: 7 (no debug info) Find error: 7C81EB33 call stack - 0 : Module ELTestU.pas Routine @Eltestu@TForm1@FormCreate Line 27 Find error: 0045A7FA call stack - 1 : Module Forms.pas Routine @Forms@TCustomForm@DoCreate Line 2648 Find error: 0044FEF3 call stack - 2 : Module Forms.pas Routine @Forms@TCustomForm@AfterConstruction Line 2575 Find error: 0044FB63 call stack - 3 : Routine @System@@AfterConstruction Find error: 00403EDA call stack - 4 : Module Forms.pas Routine @Forms@TApplication@CreateForm Line 6946 Find error: 00458DA7 call stack - 5 : Module ELTest.dpr Routine initialization Line 12 Find error: 0045EB64 call stack - 6 : (no debug info) Find error: 7C816D4B call stack - 7 : (no debug info) Find error: FFFFFFFC