don't fail inside doctest on undefined exceptions

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

    throw SomeError("bla");
Merge pull request #46 from shamrin/undefined-exception

don't fail inside doctest on undefined exceptions