title: c# can base be null in an overriden object?
body: <p>Hope someone can assist with this, it's driving me crazy.</p>
  
  <p>I have a class that inherits from a parent object and which overrides some of the methods of that object. The relevant code in one of the overrides looks like this (I've stripped out code that functions correctly):</p>
  
  <pre><code>    public override void Initialise()
      {
          if (Url != null)
          {
              _logger.LogInfo("Initialising for file " + Url);
  
              // call the base Initialise method
              try
              {
                  base.Initialise();
              }
              catch (Exception ex)
              {
                  _logger.LogError("Error on initialise : ", ex);
              }
        }
   }
  </code></pre>
  
  <p>The logger object writes to our application log database.</p>
  
  <p>When it reaches this point in the code for the first time, it logs error on initalise, and gives me an object reference not set to instance of object error. But there's no further information, no inner exception, and no line number.</p>
  
  <p>I'm left wondering if there's any way that base could possibly be null? It seems bizarre and unlikely but I'm at a loss to explain why there's no further information and why the code has resisted all my attempts to get any more information out of it.</p>
  
  <p>It's on a live server so I can't step through it, and I can't replicate the error on a test server. If anyone has any ideas as to how I can get more detail on where and how its going wrong, it'd be deeply appreciated.</p>
  
  <p>Cheers,
  Matt</p>