try { } except(...) { }

try { } except(...) { }

Post by Fric BISSO » Mon, 30 Jun 2003 16:26:28

> LCC recognizes only "__try", not "try", same goes for
LCC is a C compiler, not a C++ compiler ;-)


try { } except(...) { }

Post by Mike Caeta » Mon, 30 Jun 2003 18:39:32

This is true. However, try, except, finally and leave make up the keywords
for what's known as "Structured Exception Handling" aka "SEH" which is a
Microsoft technology and not part of C++.
dling.asp). In addition to those keywords, there are a handful of related
functions: AbnormalTermination, GetExceptionCode, GetExceptionInformation,
RaiseException, SetUnhandledExceptionFilter, and UnhandledExceptionFilter.
Those last three functions are exported by Kernel32.dll. The first three are
left for the compiler vendor to implement. Lccwin32 implements __try and
__except, but not __leave or __finally. And last I checked, doesn't
implement the first three functions above either. Google search this
newsgroup to review past discussions of this topic.



try { } except(...) { }

Post by CBFalcone » Mon, 30 Jun 2003 23:06:26

C is not C++. The identifiers try and except are in the users
namespace, while __try and __except are in the implementation

Available for consulting/temporary embedded and systems.
< > USE worldnet address!

try { } except(...) { }

Post by iddw » Tue, 01 Jul 2003 21:43:39

On Sun, 29 Jun 2003 03:14:09 GMT, "Alexander Wachter"

As others have mentioned, lcc is C and not C++, so the double
underscores prevent the implementation from encroaching on the user
namespace. Also, last I knew, even C++ did not have "finally".

But if you desperately need to use the symbols without the
underscores, make a header file (e.g., my_except.h) and place the
following therein, and #include the headerfile where needed:

#define try __try
#define except __except
#define finally __finally


Change is inevitable, progress is not.