My basic usecase is too distinguish mainly between constraint issues (uniqueness/pk broken) and system errors (full/nomem/corrupt/...). I want to avoid to duplicate the uniqueness logic in the common code (since sql can ensure it efficiently and concisely).
Thanks for the link, I understand the concerns from your point of view: more stuff to maintain and a risk of hiding some details, I presume it depends of the library consumer needs so I'll probably stay with my mapper (knowing&documenting the risks).