blacky
17-Dec-2008, 10:45 AM
Using Eurekalog 6.0.18 Enterprise.
App is running in the IDE.
Delphi 2009 Update 1.
The sample code below deliberately triggers two exceptions: "Exception A" and "Exception B".
Exception A is caught by Eurekalog and all the appropriate reporting is performed correctly.
However, comment out "Exception A" so that "Exception X" is triggered and Eurekalog does not report the exception. The app appears to just hang.
Sample code:
unit Main_Except;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, xmldom, XMLIntf, msxmldom, XMLDoc;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure ParseXml(aFileName: string);
procedure ParseNode(node: IXMLNode);
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// __________________________________________________ _______________________
procedure TForm1.Button1Click(Sender: TObject);
begin
ParseXml('test.xml');
end;
// __________________________________________________ _______________________
procedure TForm1.ParseXml(aFileName: string);
var
xml: TXMLDocument;
begin
xml := TXMLDocument.Create(nil);
try
xml.FileName := '.\'+aFileName;
xml.Active := true;
Raise Exception.Create('Exception A');
ParseNode(xml.DocumentElement);
finally
FreeAndNil(xml);
end;
end;
// __________________________________________________ _______________________
procedure TForm1.ParseNode(node: IXMLNode);
begin
Raise Exception.Create('Exception X');
end;
end.
Environment (generated when "exception A" was triggered):
Computer:
--------------------------------------------------------------------------------
5.1 Name : xxxxxxxx
5.2 Total Memory : 2046 Mb
5.3 Free Memory : 932 Mb
5.4 Total Disk : 298.08 Gb
5.5 Free Disk : 57.1 Gb
5.6 System Up Time: 32 minutes, 14 seconds
5.7 Processor : Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz
5.8 Display Mode : 1680 x 1050, 32 bit
5.9 Display DPI : 96
5.10 Video Card : NVIDIA GeForce 8600 GTS (driver 7.15.11.5824 - RAM 256 MB)
5.11 Printer : KONICA MINOLTA magicolor2300W (driver 5,51,0,0)
Operating System:
---------------------------------------
6.1 Type : Microsoft Windows Vista
6.2 Build # : 6001
6.3 Update : Service Pack 1
6.4 Language: English
6.5 Charset : 0
Network:
---------------------------------------------------------------------
<snip>
Call Stack Information:
------------------------------------------------------------------------------
|Address |Module |Unit |Class |Procedure/Method |Line |
------------------------------------------------------------------------------
|*Exception Thread: ID=5544; Priority=0; Class=; [Main] |
|----------------------------------------------------------------------------|
|004E27B9|Exceptions.exe|Main_Except.pas|TForm1|Pa rseXml |43[5]|
|004E273C|Exceptions.exe|Main_Except.pas|TForm1|Pa rseXml |38[0]|
|004E2715|Exceptions.exe|Main_Except.pas|TForm1|Bu tton1Click |31[1]|
|7758F6B1|USER32.dll | | |GetWindowLongW | |
|77668502|ntdll.dll | | |NtFindAtom | |
|773B5C9A|GDI32.dll | | |DeleteObject | |
|77590AF5|USER32.dll | | |SendMessageW | |
|77590697|USER32.dll | | |CallWindowProcW | |
|77590681|USER32.dll | | |CallWindowProcW | |
|77657D80|ntdll.dll | | |RtlLeaveCriticalSection| |
|7757E001|USER32.dll | | |GetCapture | |
|7759005B|USER32.dll | | |DispatchMessageW | |
|77590051|USER32.dll | | |DispatchMessageW | |
|004E3A39|Exceptions.exe|Exceptions.dpr | | |14[4]|
|7703490F|kernel32.dll | | |BaseThreadInitThunk | |
------------------------------------------------------------------------------
App is running in the IDE.
Delphi 2009 Update 1.
The sample code below deliberately triggers two exceptions: "Exception A" and "Exception B".
Exception A is caught by Eurekalog and all the appropriate reporting is performed correctly.
However, comment out "Exception A" so that "Exception X" is triggered and Eurekalog does not report the exception. The app appears to just hang.
Sample code:
unit Main_Except;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, xmldom, XMLIntf, msxmldom, XMLDoc;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure ParseXml(aFileName: string);
procedure ParseNode(node: IXMLNode);
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// __________________________________________________ _______________________
procedure TForm1.Button1Click(Sender: TObject);
begin
ParseXml('test.xml');
end;
// __________________________________________________ _______________________
procedure TForm1.ParseXml(aFileName: string);
var
xml: TXMLDocument;
begin
xml := TXMLDocument.Create(nil);
try
xml.FileName := '.\'+aFileName;
xml.Active := true;
Raise Exception.Create('Exception A');
ParseNode(xml.DocumentElement);
finally
FreeAndNil(xml);
end;
end;
// __________________________________________________ _______________________
procedure TForm1.ParseNode(node: IXMLNode);
begin
Raise Exception.Create('Exception X');
end;
end.
Environment (generated when "exception A" was triggered):
Computer:
--------------------------------------------------------------------------------
5.1 Name : xxxxxxxx
5.2 Total Memory : 2046 Mb
5.3 Free Memory : 932 Mb
5.4 Total Disk : 298.08 Gb
5.5 Free Disk : 57.1 Gb
5.6 System Up Time: 32 minutes, 14 seconds
5.7 Processor : Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz
5.8 Display Mode : 1680 x 1050, 32 bit
5.9 Display DPI : 96
5.10 Video Card : NVIDIA GeForce 8600 GTS (driver 7.15.11.5824 - RAM 256 MB)
5.11 Printer : KONICA MINOLTA magicolor2300W (driver 5,51,0,0)
Operating System:
---------------------------------------
6.1 Type : Microsoft Windows Vista
6.2 Build # : 6001
6.3 Update : Service Pack 1
6.4 Language: English
6.5 Charset : 0
Network:
---------------------------------------------------------------------
<snip>
Call Stack Information:
------------------------------------------------------------------------------
|Address |Module |Unit |Class |Procedure/Method |Line |
------------------------------------------------------------------------------
|*Exception Thread: ID=5544; Priority=0; Class=; [Main] |
|----------------------------------------------------------------------------|
|004E27B9|Exceptions.exe|Main_Except.pas|TForm1|Pa rseXml |43[5]|
|004E273C|Exceptions.exe|Main_Except.pas|TForm1|Pa rseXml |38[0]|
|004E2715|Exceptions.exe|Main_Except.pas|TForm1|Bu tton1Click |31[1]|
|7758F6B1|USER32.dll | | |GetWindowLongW | |
|77668502|ntdll.dll | | |NtFindAtom | |
|773B5C9A|GDI32.dll | | |DeleteObject | |
|77590AF5|USER32.dll | | |SendMessageW | |
|77590697|USER32.dll | | |CallWindowProcW | |
|77590681|USER32.dll | | |CallWindowProcW | |
|77657D80|ntdll.dll | | |RtlLeaveCriticalSection| |
|7757E001|USER32.dll | | |GetCapture | |
|7759005B|USER32.dll | | |DispatchMessageW | |
|77590051|USER32.dll | | |DispatchMessageW | |
|004E3A39|Exceptions.exe|Exceptions.dpr | | |14[4]|
|7703490F|kernel32.dll | | |BaseThreadInitThunk | |
------------------------------------------------------------------------------