client: extract transaction errors

Introduce TransactionErrorException, which will be thrown for transaction
errors.

This is the first pass at fixing #16.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>