Return exceptions after throwing in case we need to modify them
PHP-1230: Implement WriteException class
Throw WriteException on failed write ops

If available, the WriteResult should be set on the exception