Hi, akzare -
I understand your frustration. The problem is that Microsoft has an OS-level feature called "Structured Exception Handling" (SEH) that their VC++ compiler (or, more precisely, their MSVC runtime) uses to implement C++ try/catch blocks.
The result is non-portable code. ANSI C++ try/catch blocks are
NOT intended to catch OS-level events like segmentation faults or floating point exceptions. But, let's face it - Microsoft's Visual Studio, SEH-based implementation is really convenient (to say nothing of a lot more efficient)!
Probably the best approach in your case is to use "signal()" to trap OS-level events (SIGSEGV, SIGFPE, etc) that might occur. Perhaps you want to "#ifdef" these calls, so they're only compiled in the non-Windows versions of the code.
Although I wasn't able to find any good links that directly talk about "pure ANSI C++ vs. Microsoft SEH", these should give you the flavor of the problem:
http://www.dbforums.com/t502031.html
http://rds.yahoo.com/_ylt=A0geurvc7u...onhandling.htm
http://msdn.microsoft.com/chats/tran...io_022703.aspx
'Hope that helps .. PSM