wreis / DBIx-Class-ParseError

Extensible database error handler
Other
2 stars 3 forks source link

ParseError dies when it can't parse an error #5

Open pplu opened 3 years ago

pplu commented 3 years ago

Hi,

I was wondering what you would think about changing a bit the behavior of this module. When the error from DBI cannot be parsed, it throws an exception. https://github.com/wreis/DBIx-Class-ParseError/blob/master/lib/DBIx/Class/ParseError/Parser.pm#L250.

Since the module is already used in exception handlers, It would be nice that it returned an exception object even if it couldn't parse the message, making the exception handling code simpler.

Would you be interested in a patch in this direction?

wreis commented 3 years ago

Would you be interested in a patch in this direction?

Yeah, please. Sounds good to me.