On Mon, Oct 15, 2018 at 06:23:57PM +0100, Daniele Varrazzo wrote:
> I think it's responsible to make a decision. Having two names to refer
> to a thing is confusing. One of the two would be the "blessed" one -
> the one appearing in the tracebacks. And if a traceback says that
> 'unique_violation' was raised, it would be weird to solve it by
> writing a handler for 'UniqueViolation'.
I would then stick with UniqueViolation.
Perhaps an attribute
UniqueViolation.pg_error_name = unique_violation
so people _can_ know what to grep for ?
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B