15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


suppressing C++ exception msgs in MSVC 4.x debug wnd

Keith Huffer -- khuffer@gatan.com
Friday, January 24, 1997


Environment: Windows 95 MSVC 4.2-flat 

hello:

i have a C++ program that uses try/throw/catch extensively.
i expect (and get) many exceptions.

while running the MSVC V4.x IDE, i have msgs similar to the following
repeated hundreds of times:

First-chance exception in XXXX.exe: 0xE06D7363: Microsoft C++ Exception.

the plethora of redundant, useless msgs makes finding my own TRACE() outputs
problematical.

while the IDE debugger was running i chose Debug/Exceptions from the menu, then
i removed the "e06d7363  Microsoft C++ Exception" line, but the msgs still occur
(and the line comes back!)

does anyone know how to suppress exception reporting?

thanks,
-keith huffer
khuffer@gatan.com



Mike Blaszczak -- mikeblas@nwlink.com
Sunday, January 26, 1997

At 07:21 1/24/97 -0800, Keith Huffer wrote:
>
>Environment: Windows 95 MSVC 4.2-flat 

Using the unpatched version of MFC will cause you trouble sooner
or later, no matter what.  You should update MFC by installing
the patch; MFC 4.2-flat works properly only with unsupported,
beta system components.

>does anyone know how to suppress exception reporting?

You can't.  The debugger always blows the message so that you
know an exception has happened. Otherwise, while stepping through
your code, you'd be startled by sudden changes in the flow of
control.

If you're writing code that generates tons of exception messages,
you might want to consider fixing things: even exceptions that
happen on purpose are are properly handled aren't very good because
raising an exception and handling an exception is a very expensive
operation. 

That you have so many exception messages that you can't identify your
mainstream TRACE() output suggests that your program is abusing
exceptions. Exceptions are for exceptional situations, not
for common events.


.B ekiM
http://www.nwlink.com/~mikeblas/
Why does the "new" Corvette look like a 1993 RX-7?
These words are my own. I do not speak on behalf of Microsoft.




Grant Shirreffs Great Elk -- Grant.S@greatelk.com
Tuesday, January 28, 1997

Quite.  Isn't it annoying that CFile::LockRange throws an exception,
rather than returning an error?

I would have thought that a lock conflict would have been a "common
event" rather than an "exceptional situation".

>Original Message-----
From:	Mike Blaszczak [SMTP:mikeblas@nwlink.com]
Sent:	Sunday, 26 January, 1997 21:50
To:	mfc-l@netcom.com
Subject:	Re: suppressing C++ exception msgs in MSVC 4.x debug wnd
>  
That you have so many exception messages that you can't identify your
mainstream TRACE() output suggests that your program is abusing
exceptions. Exceptions are for exceptional situations, not
for common events.


.B ekiM
http://www.nwlink.com/~mikeblas/
Why does the "new" Corvette look like a 1993 RX-7?
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |