[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: UU: DB: Exception differentiation
Alexey Parshin wrote:
Well, first, PG always throws the same exception. It doesn't support
anything but messages.
Second, we can standardise several exception classes, like "Invalid
data value" or "Record not found", but the only way is to put
something in the message within stored proc, like:
RAISE EXCEPTION '{INVALID_DATA_VALUE} Field language can not be
NULL or 0';
In that case you still have to process the message but you have less
guessing, and you can distinguish PG internal exceptions from our
exceptions.
That's exactly what I want to do. I'm just thinking of the best way
to make common source of the mapping table.
Ilya.