Catching hardware exceptions using C++ exceptions 
Author Message
 Catching hardware exceptions using C++ exceptions

Hello,

can somebody tell me, how to catch and identify hardware or OS exceptions, e. g.
access violation, using the C++ exception model.

I know that I can catch those witch catch (...), but how can I identify the cause
for the exception.

I found nothing about it in the MSDN docs, except for the older SEH model, but it
seems that it is not possible to mix SEH and C++ exceptions.

Any hints or links are welcome.

Thank you.

Kurt



Sat, 29 Nov 2003 18:04:27 GMT  
 Catching hardware exceptions using C++ exceptions
Hardware exceptions are caught by Win32 SEH which is a distinct thing
from C++ exception handling.

You can however use _set_se_translator() function to map a hardware
exception into a C++ object exception.

Search for _set_se_translator() for more info.

Rob



Hello,

can somebody tell me, how to catch and identify hardware or OS
exceptions, e. g.
access violation, using the C++ exception model.

I know that I can catch those witch catch (...), but how can I identify
the cause
for the exception.

I found nothing about it in the MSDN docs, except for the older SEH
model, but it
seems that it is not possible to mix SEH and C++ exceptions.

Any hints or links are welcome.

Thank you.

Kurt



Sat, 29 Nov 2003 18:14:11 GMT  
 Catching hardware exceptions using C++ exceptions
Hi Rob,

thanx for the good hint.

I had a look at the documentation for _set_se_translator(). It seems like that's
what I am looking for.

Do you know of any pitfalls using it in a highly multithreaded application?

Regards, Kurt



Sat, 29 Nov 2003 19:32:42 GMT  
 Catching hardware exceptions using C++ exceptions
Hi Rob,

thanx for the good hint.

I had a look at the documentation for _set_se_translator(). It seems like that's
what I am looking for.

Do you know of any pitfalls using it in a highly multithreaded application?

Regards, Kurt



Sat, 29 Nov 2003 19:32:35 GMT  
 Catching hardware exceptions using C++ exceptions
Hi Rob,

thanx for the good hint.

I had a look at the documentation for _set_se_translator(). It seems like that's
what I am looking for.

Do you know of any pitfalls using it in a highly multithreaded application?

Regards, Kurt



Sat, 29 Nov 2003 19:32:47 GMT  
 Catching hardware exceptions using C++ exceptions
Its fine providing you link to the multithread C++ runtime (which you
should already be doing).

Rob



Hi Rob,

thanx for the good hint.

I had a look at the documentation for _set_se_translator(). It seems
like that's
what I am looking for.

Do you know of any pitfalls using it in a highly multithreaded
application?

Regards, Kurt



Sat, 29 Nov 2003 21:24:51 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Catching SEC Exceptions as C++ Exceptions

2. Catching Win32 exceptions with a C++ catch-block

3. catching Win32 API exceptions in C++

4. Howto catch Win32 exceptions in C++?

5. catching math exceptions with C++

6. Catching SEH and c++ exception

7. C++/MFC and exceptions- catch(...)=bad?

8. Catching Structure Exceptions in C++ EH

9. Q: Why try catch cannot catch the exception

10. Translate a SEH exception into a C++ exception

11. Win32 structured exceptions vs C++ exceptions

12. retrieve exception context in C++ exception handler

 

 
Powered by phpBB® Forum Software