F
Figmo
I'm new to C# and I have a question on how the debugger handles various
errors.
A) Sometimes - I get an error and the debugger breaks on the line with
the error so I can take a look at it. And it gives me a nice error
message on why it didn't like this line of code.
B) Sometimes - I get an error and it will not take me to the debugger -
instead I receive a message box with error info and a section saying
that I need to enable JIT debugging. I have tried to follow the
included directions but I always get this message box for this type of
error.
C) The wierd one: sometimes - I get an error and the method just exits
without reporting anything. I can step through it line by line with
the debugger and when I step over the offending line of code - the
function just returns. No error message. This is perhaps the
strangest of the 3 scenarios. The first 2 I can handle no problem -
but I just can't understand how the compiler can just bail out of a
function without throwing an exception or otherwise alerting me that
something bad happened. Usually - this is when I'm calling a method of
some component and passed it some invalid data. I can see the problem
if I look hard enough - but I'm stunned that I received no error
message.
Just curious - why the lack of consistency?
errors.
A) Sometimes - I get an error and the debugger breaks on the line with
the error so I can take a look at it. And it gives me a nice error
message on why it didn't like this line of code.
B) Sometimes - I get an error and it will not take me to the debugger -
instead I receive a message box with error info and a section saying
that I need to enable JIT debugging. I have tried to follow the
included directions but I always get this message box for this type of
error.
C) The wierd one: sometimes - I get an error and the method just exits
without reporting anything. I can step through it line by line with
the debugger and when I step over the offending line of code - the
function just returns. No error message. This is perhaps the
strangest of the 3 scenarios. The first 2 I can handle no problem -
but I just can't understand how the compiler can just bail out of a
function without throwing an exception or otherwise alerting me that
something bad happened. Usually - this is when I'm calling a method of
some component and passed it some invalid data. I can see the problem
if I look hard enough - but I'm stunned that I received no error
message.
Just curious - why the lack of consistency?