don't fail inside doctest on undefined exceptions

This happens if test forgets `new` when throwing exception:

    throw SomeError("bla");