Avoiding first chance exception messages when the exception is safely handled
2012-01-09 12:04
411 查看
from:http://stackoverflow.com/questions/58380/avoiding-first-chance-exception-messages-when-the-exception-is-safely-handled
Actually if are having many exceptions per second, you would achieve must better performance by checking reader.EndOfStream-value.. Printing out those exception messages is unbelievably slow, and hiding them in visual studio won't speed up anything.
The point of "first-chance" exceptions is that you're seeing them pre-handler so that you can stop on them during debugging at the point of throwing. A "second-chance" exception is one that has no appropriate handler. Sometimes you want to catch "first-chance" exceptions because it's important to see what's happening when it's being thrown, even if someone is catching it.
There's nothing to be concerned with. This is normal behavior.
-------------------------------------
To avoid seeing the messages, right-click on the output window and uncheck "Show exceptions" (the name may not be exactly that, I don't have VS here right now).
However, seeing them happen might be nice, if you're interested in knowing when exceptions are thrown without setting breakpoints and reconfiguring the debugger.
Actually if are having many exceptions per second, you would achieve must better performance by checking reader.EndOfStream-value.. Printing out those exception messages is unbelievably slow, and hiding them in visual studio won't speed up anything.
Answers
-------------------------------------The point of "first-chance" exceptions is that you're seeing them pre-handler so that you can stop on them during debugging at the point of throwing. A "second-chance" exception is one that has no appropriate handler. Sometimes you want to catch "first-chance" exceptions because it's important to see what's happening when it's being thrown, even if someone is catching it.
There's nothing to be concerned with. This is normal behavior.
-------------------------------------
To avoid seeing the messages, right-click on the output window and uncheck "Show exceptions" (the name may not be exactly that, I don't have VS here right now).
However, seeing them happen might be nice, if you're interested in knowing when exceptions are thrown without setting breakpoints and reconfiguring the debugger.
相关文章推荐
- Fixing the "There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- What is a First Chance Exception
- Science Says This Is How to Make the Perfect First Impression You only get one chance for a first i
- What is a First Chance Exception(什么是第一轮异常)
- What is a First Chance Exception?
- 241. It is too late to grieve when the chance is past. 坐失良机,后悔莫及
- spy 26 When the first input is a message identifier, the second input must be a string.错误
- What is a First Chance Exception?
- What is a First Chance Exception
- “A first chance exception of type…” Messages in VS 2005
- [面试题]Amazon: Given two binary trees,if the first tree is subtree of the second one
- weblogic.management.ManagementException: The domain edit lock is owned by another session in ...
- Read Notify is the fastest, easiest, most reliable way to find out when email you've sent gets read.
- ant show the numbers when the system occour exception
- There is no sound when MessageBox pops up after updating code to the new 7.1
- the first is over
- The search path when DLL is loading on Windows
- Web Service 之 Exception: "The HTTP request is unauthorized with client authentication scheme......"
- wine update错误 "the cache has no package" error when wine update is available
- 【译】Why JavaScript Is and Will Continue to Be the First Choice of Programmers