PDA

View Full Version : Class name in witch exception was raised


SVA
28-Jul-2006, 08:54 AM
Please, answer for this qurstion:
How can i get (in the ExceptionNotify event handler) a name of class in witch exception was raised?
For example, when i used JCL i did this so:

procedure TForm1.OnException(Sender: TObject; E: Exception);
var
ClassName: String;
begin
ClassName := Sender.ClassName;
...
end;

P.S.
Sorry for my bad english.

Best regards.

admin
02-Aug-2006, 06:12 PM
Hi,

SVA wrote:
> Please, answer for this qurstion:
> How can i get (in the ExceptionNotify event handler) a name of class in
> witch exception was raised?
> For example, when i used JCL i did this so:
>
> procedure TForm1.OnException(Sender: TObject; E: Exception);
> var
> ClassName: String;
> begin
> ClassName := Sender.ClassName;
> ..
> end;
>
> P.S.
> Sorry for my bad english.
>
> Best regards.

You can simple use the "ExcRecord.ExceptionObject.ClassName" ExceptionNotify
parameter.

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG, every time!