-
September 13th, 2010, 08:28 AM
#1
Stopping error pop box
Hi all,
Searched around but can't quite find an answer, and hope this is the right place to ask the question.
Basically, we have coded up a dll, which is called by a 3rd party application. This was originally coded in Visual Studio 6. We recently had to migrate the code to being compiled under visual studio 2008.
On the new version of the dll we had an error which caused a pop error box of the type 'An unhandled win32 Exception occured in ******'. We found the error and corrected it no problem, however, the error does not cause the pop-up when run from the Visual Studio 6 build and I was wondering if there is a compile time option on Visual Studio 2008 that we could use to prevent the the pop-up message.
The dll & 3rd party application are run in a batch mode and the pop-up window causes everything to hang until someone actions the pop-up, which is not possible in batch operation.
We would prefere any future error to be noted and corrected afterwards rather then impact on a batch run.
Thanks for any help on this.
-
September 13th, 2010, 08:56 AM
#2
Re: Stopping error pop box
try/catch?
Thats just hiding the problem though.
-
September 13th, 2010, 09:55 AM
#3
Re: Stopping error pop box
Would happily hide the problem if it meant the pop-up box would not appear!
We have corrected for the issue we found (try- catch didn't actually catch the issue), but this is more to do with stopping the error pop-up message in the future if something else unexpected happens (Pop-up doesn't happen in the Visual Studio 6 version).
Really just wondering if anyone else had something similar and if there are any complie time options in VS2008 we could use.
-
September 13th, 2010, 05:05 PM
#4
Re: Stopping error pop box
No there's no compiler/linker switch available for this.
If try/catch doesn't solve your issue you have a non C++ expection. Check out SEH http://msdn.microsoft.com/en-us/libr...57(VS.85).aspx
-
September 13th, 2010, 06:11 PM
#5
Re: Stopping error pop box
Your best best is to debug and fix the code issue. VC6 wasn't very compliant and VC2008 is more strict and is exposing a coding error.
-
September 13th, 2010, 07:39 PM
#6
Re: Stopping error pop box
Originally Posted by NCIRL
We found the error and corrected it no problem, however, the error does not cause the pop-up when run from the Visual Studio 6 build
First you say you fixed the error, then you say that "the error does not...". I thought you fixed the error?
and I was wondering if there is a compile time option on Visual Studio 2008 that we could use to prevent the the pop-up message.
Why not fix the error now? The time it could take you to look for band-aid solutions could have been spent in diagnosing the cause of the problem.
The dll & 3rd party application are run in a batch mode and the pop-up window causes everything to hang until someone actions the pop-up, which is not possible in batch operation.
A lot of people would not put trust in a program that has an error, regardless of when it happens. If the DLL was coded in C++, runtime errors could be the sign of other things internally wrong with the program that you have yet to identify.
Also, what if you could cover up this dialog box? What if the error is a very serious one? You would never know, and whoever is running this batch file is risking something very serious going wrong.
Fix the error. Or at the very least, identify what the error is, note it, and then see if it can be "left for later".
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|