Ayende @ Rahien

Refunds available at head office

Exception Handling - the ugly

If this was an art, I would name it "Without Words" 

HelperObj obj;
int Foo()
{
  try
  {
     return obj.DoWork()
  }
  catch (NullReferenceException )
  {
    obj = new HelperObj();
    return Foo();
  }
}

Some people seems to like exceptions all too much.

Comments

No comments posted yet.

Comments have been closed on this topic.