Results 1 to 4 of 4

Thread: Catching NullReferenceException

Threaded View

  1. #1

    Thread Starter
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Catching NullReferenceException

    Hello, I'm totally confused about my IDE behavior.
    When I debug a program my IDE simply does not catch System.NullReferenceException - execution continues as if there were nothing wrong.

    I may sound crazy, but this is a medical fact.
    Moreover, when I go to the menu Debug/Exceptions System.NullReferenceException is not even in the list
    (Common Language Runtime Exceptions).
    I manually add it (there is the Add button) and I put a checkmark in the 'Thrown' and 'User unhandled' column - now IDE catches it, but after I re-load the project the situation re-appears - and NullReferenceException is not on the list again. What may be wrong?

    Update:
    No, when I step through the code the execution does not continue but exits the current block of code (sub or function). There were no Try...Catch blocks and there is a message: A System.NullReferenceException occured in MSCorlib.dll...
    But why doesn't the debugger stop at this line?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width