Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re-raising exceptions : how to get the error message

0 views
Skip to first unread message

Paul Coshott

unread,
Jul 30, 2003, 5:36:15 AM7/30/03
to
Hi All.

I am using raise as follows :

try
TranError := False;
....
except
raise;
TranError := True;
end;

This was while we were testing, but now I want the code to flow on without
displaying an error and instead, write the error message to a log file. How
do I get the error message ?

--

Cheers,
Paul
PAC Software Solutions


Mike Shkolnik

unread,
Jul 30, 2003, 5:47:46 AM7/30/03
to
try
except
on E: exception do
<log here the E.Message>
end;

--
With best regards, Mike Shkolnik
EMail: mshk...@scalabium.com
http://www.scalabium.com

"Paul Coshott" <pa...@pacsoftware.com.au> сообщил/сообщила в новостях
следующее: news:3f27...@newsgroups.borland.com...

Marjan Venema

unread,
Jul 30, 2003, 5:48:24 AM7/30/03
to
>except
on E: Exception do begin
ErrorMessage := E.Message;

> raise;
> TranError := True;
end;
>end;

Marjan
____________________________
Marjan Venema - BJM Software
http://www.bjmsoftware.com
http://www.bjmsoftware.nl

Paul Coshott

unread,
Jul 30, 2003, 10:44:11 AM7/30/03
to
Hi Mike and Marjan,

thanks very much for your help. I have it working now.

--

Cheers,
Paul
PAC Software Solutions

"Marjan Venema" <in...@bjmsoftware.OhNoNotThis.com> wrote in message
news:m15fivcie2j50ns1b...@4ax.com...

Igor Raskin

unread,
Jul 30, 2003, 2:23:23 PM7/30/03
to
"Paul Coshott" <pa...@pacsoftware.com.au> wrote in message
news:3f27...@newsgroups.borland.com...

> Hi All.
>
> I am using raise as follows :
>
> try
> TranError := False;
> ....
> except
> raise;
> TranError := True;
> end;

You understand, of course, that the second assignment
never happens?

Igor

0 new messages