From: Claudio V. C. <cv...@us...> - 2006-06-02 09:09:54
|
> -----Original Message----- > From: fir...@li... > [mailto:fir...@li...]On Behalf Of Rick > Debay > > > Rather than hard-coding 1500, would it be possible to catch the stack > exception in the parser, and return the 'member list' error? Or is it > difficult to return the error at that stage of the process? Let me explain another issue: MS provided both SEH (Structured Exception Handling) and C++ exceptions. SEH was intended for C programs. You can mix both, but the results are generally disastrous. It's very probable that at least until VC6, MS based its C++ exception handling on SEH, making the intermix of two a recipe to disaster. There's a way to detect stack exhaustion on Windows, but I'm not sure this is possible in other platforms. It involves setting a handler each time a new thread is created and providing this handler with a translation from a specific SEH value to a C++ exception that we can trap. More information here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/ _CRT__set_se_translator.asp or here http://msdn2.microsoft.com/en-us/library/5z4bw5h5.aspx C. |