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

ExceptObject depricated?

2 views
Skip to first unread message

Per Bakkendorff

unread,
Sep 1, 2006, 4:41:42 AM9/1/06
to
Does anyone know why ? Is there a replacement for this (in my view) very
handy object ref. ?

Yes, I known I can use:

try
.
.
except on e: exception<class> do
// use e as ExceptObject
end;

In Win32 personality this compiles without any warning

Thnx

Per

Marc Rohloff [TeamB]

unread,
Sep 1, 2006, 5:30:15 PM9/1/06
to
On Fri, 01 Sep 2006 10:41:42 +0200, Per Bakkendorff wrote:

> Does anyone know why ? Is there a replacement for this (in my view) very
> handy object ref. ?

It is only deprectated in .NET, this is what the source code says:
function ExceptObject: TObject; deprecated; // expensive. Get out of
the habit

In your case you should just use 'e', there is no need to call
ExceptObject.

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

Per Bakkendorff

unread,
Sep 4, 2006, 8:17:38 AM9/4/06
to
Marc Rohloff [TeamB] wrote:
> On Fri, 01 Sep 2006 10:41:42 +0200, Per Bakkendorff wrote:
>
>> Does anyone know why ? Is there a replacement for this (in my view) very
>> handy object ref. ?
>
> It is only deprectated in .NET, this is what the source code says:
> function ExceptObject: TObject; deprecated; // expensive. Get out of
> the habit
>
> In your case you should just use 'e', there is no need to call
> ExceptObject.

Thnx Marc

Per

0 new messages