c# - Avoiding first chance exception messages when the exception is safely handled -


the following bit of code catches eos exception

using (var reader = new binaryreader(httprequestbodystream)) {      try {         while (true) {             bodybytelist.add(reader.readbyte());         }     } catch (endofstreamexception) { } } 

so why still receive first-chance exceptions in console?

a first chance exception of type 'system.io.endofstreamexception' occurred in mscorlib.dll

is there way hide these first chance exception messages?

the point of "first-chance" exceptions you're seeing them pre-handler can stop on them during debugging @ point of throwing. "second-chance" exception 1 has no appropriate handler. want catch "first-chance" exceptions because it's important see what's happening when it's being thrown, if catching it.

there's nothing concerned with. normal behavior.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -