Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

try/catch versus runtime error dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lennart - 02 Mar 2006 15:42 GMT
Hi all,

Maybe someone can help me with this:

My C++ project contains try and catch blocks. A catch-all block triggers my
custom message box with some information on the error caught. The stacktrace
is written to a log file. While stepping through my application from within
the IDE everything works fine. However, when i start my application outside
the IDE (which is an MS Outlook plugin, by the way) i receive this annoying
"Microsoft Visual C++ Runtime Library" error dialog telling me of a "Runtime
Error!". It seems that my catch block is ignored!

A google search, unfortunately, only turned up a reference to the function
set_terminate() which allows me to redirect the exception handling before,
again, this runtime dialog fires.

Is there a method (compiler switches, Macros, includes, library imports
whatever) which prevents this ugly message box to appear?

regards,

Lennart
Lennart - 02 Mar 2006 16:23 GMT
...setting -EHa compiler option and including #include <excpt.h> did the job.

> Hi all,
>
[quoted text clipped - 18 lines]
>
> Lennart

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.