// Do not remove this try catch block.
-
public bool IsEmpty
{
get {
try {
return _filters.IsEmpty();
}
catch (NullReferenceException e)
{
InstantiateFilters();
throw new NullReferenceException("Try it again now please.");
}
}
}That tells you everything. You're variously trying to call an IsEmpty() method on a null _filters object. The exception is caught, InstantiateFilters() then fills up your filters variable from your calling code. The next time around in the finally it calls on the IsEmpty property again but this time _filters has been instantiated and the 'try' passes without a problem.
-
That tells you everything. You're variously trying to call an IsEmpty() method on a null _filters object. The exception is caught, InstantiateFilters() then fills up your filters variable from your calling code. The next time around in the finally it calls on the IsEmpty property again but this time _filters has been instantiated and the 'try' passes without a problem.
I'm not the OP so I have no knowledge of the actual code. That was just a stupid joke on my part.