Avoiding first chance exception messages when the exception is safely handled
Posted
by CVertex
on Stack Overflow
See other posts from Stack Overflow
or by CVertex
Published on 2008-09-12T05:48:36Z
Indexed on
2010/05/09
21:58 UTC
Read the original article
Hit count: 663
The following bit of code catches the EOS Exception
using (var reader = new BinaryReader(httpRequestBodyStream)) {
try {
while (true) {
bodyByteList.Add(reader.ReadByte());
}
} catch (EndOfStreamException) { }
}
So why do I still receive first-chance exceptions in my console?
A first chance exception of type 'System.IO.EndOfStreamException' occurred in mscorlib.dll
Is there a way to hide these first chance exception messages?
© Stack Overflow or respective owner