Use of TMSStoredProc

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
joepasquariello
Posts: 38
Joined: Wed 16 May 2007 01:12

Post by joepasquariello » Tue 29 Jan 2008 17:02

okay, thanks. One last question. If all exceptions are derived from class Exception, then what is the purpose of using the "..." syntax? Is there some reason to prefer the 2nd example below?

Joe

try {}
catch (...) {}

instead of

try {}
catch (Exception &E) {}

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 30 Jan 2008 08:10

From Delphi help: All VCL exception classes descend from one root object called Exception.

The second approach is useful when you need access to the exsception object. Also in some cases C++Builder has a memory leak for the first approach.

joepasquariello
Posts: 38
Joined: Wed 16 May 2007 01:12

Post by joepasquariello » Wed 30 Jan 2008 17:29

Really? Can you describe the situation in which C++ Builder will leak memory when the "(...)" syntax is used? I think that Codegear is saying they have fixed this problem, but I don't know if it's the same problem.

Joe

joepasquariello
Posts: 38
Joined: Wed 16 May 2007 01:12

Post by joepasquariello » Wed 30 Jan 2008 22:34

Antaeus,

I posted a description of the problem to the Codegear C++ Builder IDE newsgroup, and a member of TeamB says that this does seem to indicate a compiler problem. Thanks for the work-around, and for all of your help.

Joe

Post Reply