don't fail inside doctest on undefined exceptions

This happens when test forgets `new`:

throw Error("bla");
// => Error: bla