Solved

How to catch native WIN NT exceptions?

Posted on 2002-06-28
7
277 Views
Last Modified: 2008-02-01
I would like to catch a specific WIN NT exception within the code. How can it be done? I don't want to use the (...) notation, because I want all other exceptions to continue propogating on all levels. The specific exception number is 0xE06D7363. (I'm almost sure it's a WIN NT specific exception). Thanks!
0
Comment
Question by:orend
7 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 7115795
Have you tried __try, __except /__try , __finally

Roshmon
0
 

Author Comment

by:orend
ID: 7115804
There's an unwritten law we shouldn't use code dealing specifically with NT... is there another way to catch it?
0
 

Author Comment

by:orend
ID: 7115809
There's an unwritten law we shouldn't use code dealing specifically with NT... is there another way to catch it?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:orend
ID: 7115839
There's an unwritten law we shouldn't use code dealing specifically with NT... is there another way to catch it?
0
 

Author Comment

by:orend
ID: 7115865
Err... sorry for the multiple postings.
0
 
LVL 32

Expert Comment

by:jhance
ID: 7116057
Hmmm, I think your "unwritten law" is questionable in the context of this problem.

You want to catch a "specific Windows NT" exception but you don't want to use "code dealing specifically with NT" to do it.  Sounds like a "Catch-22".

The way to get at any and all exceptions (other than DEVICE DRIVER / BSOD faults) is via the SetUnhandledExceptionFilter WIN32 API.  Here you have complete access to anything that happens before Windows displays a problem or starts a debugger.

Unfortunately for you, this is Windows specific.  I know of no way in C++ to catch all Windows NT exceptions.
0
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7116257
>>The specific exception number is 0xE06D7363.
>>(I'm almost sure it's a WIN NT specific exception).

This is a "Microsoft C++ exception" - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q185294 ("PRB: Exception Code 0xE06D7363 When Calling Win32 SEH APIs (Q185294)") and http://msdn.microsoft.com/code/default.asp?url=/msdn-files/026/002/136/BugslayerUtil/Source%20Files/CrashHandler_cpp.asp on how to catch tha. It seems that you will have to break an 'unwritten law' that is IMHO stupid - if you have to deal with platform specific exceptions, use platform specific code.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now