473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to debug application using SetUnhandledExceptionFilter function for exception handling

Hi

We are using the API "SetUnhandledExceptionFilter" to handle the exceptions
globally as:

SetUnhandledExceptionFilter(MyUnHandleExceptionFil ter);

where the prototype of "MyUnHandleExceptionFilter" is:

LONG WINAPI MyUnHandleExceptionFilter(struct _EXCEPTION_POINTERS
*lpExceptionInfo);

This works fine while running in Debug and Release modes. But while
debugging, it is not handling the exceptions. In MSDN It is mentioned that
this function doesn't support the Debugging.

Ex:
void TestIntegerDivideByZero(int x, int y)
{
try
{
int ix = 0;
int nVal = 0;
int ix = 5 / nVal; //It is not possible to proceed from this statement
while debugging.
_tprintf(_T("Integer By Zero - Result = %d\n"), ix);
++ix;
}
catch (OSException& exception)
{
_tprintf(_T("<Thread - %x> - Exception Code = %x\n"),
GetCurrentThreadId(), exception.getExceptionCode());
}
}
We already know that the SetUnhandledExceptionFilter doesn't handle
exceptions while debugging, because the debugger will catch the exceptions
while debugging. This functionality is implemented in dll and used in other
exe's. To debug other exe's this functionality should not make any
difficulties.

Can any one please let us know how to handle the exceptions while debugging
?

Are there any other APIs with which we can combine the
SetUnhandledExceptionFilter and solve the purpose??

Regards,
Raghunath.
Jul 23 '05 #1
1 7731
Raghunatha Babu wrote:
We are using the API "SetUnhandledExceptionFilter" to handle the exceptions globally as:


Please use http://groups.google.com to search for the best newsgroup for
SetUnhandledExceptionFilter(). This group tries to discuss raw C++.

Also, you might accidentally find the answer...

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jake | last post by:
I'm trying to create an all encompassing error handler to handle all Unhandled Exceptions. I have added an event handler to AppDomain.CurrentDomain.UnhandledException and everything works fine when...
2
by: kpax | last post by:
Hi, While debugging my application when an explicit exception is thrown by me (or an implicit exception is thrown internally) which is not handled anywhere in the stack, the execution breaks as...
4
by: rs | last post by:
Hi guys Thank you in advance for the help. I developed a simple application using vs.net 2003. running framework 1.1 sp1. the application runs fine on the development machine (win xp). I tried...
4
by: Josh Soref | last post by:
It seems that windows file systems can have files dated to 1617, and unfortunately if you call _findfirst/_findnext on such a directory, msvcr80d will assert. Is there some provision for...
7
by: tommaso.gastaldi | last post by:
It would be useful, sometimes, when debugging, to disable all the try /catch one has in the program (clearly not commenting them out). Any info or hint on that? -tom
2
by: Epetruk | last post by:
Hello, I have a problem where an application I am working on throws an OutOfMemoryException when I run it in Release mode, whereas it doesn't do this when I am running in Debug. The...
8
by: Jothishankar | last post by:
Hi, I am new to c#. I am trying to build an application that does backup of files to an external hard disk. My application behaves strangely. When i run the application under debug mode (F5),...
1
by: George2 | last post by:
Hello everyone, Such code segment is used to check whether function call or exception- handling mechanism runs out of memory first (written by Bjarne), void perverted() { try{
3
by: z00mit | last post by:
Hi Guys, Have a question regarding the exception filter. I have a MiniDump class which looks like this: class MiniDumpHelper { public:
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.