Modify error handling so dialects can translate exceptions

Application level code is particularly interested in duplicate
primary key types of errors being special from other types of
ORM exceptions.  Decoding these is driver specific, so we defer
the error handling to each dialect.

Signed-off-by: Shawn O. Pearce <sop@google.com>
6 files changed