Merge pull request #1221 from arisk/patch-1

Added PDO error code
This commit is contained in:
Taylor Otwell
2013-01-05 13:33:51 -08:00

View File

@@ -22,6 +22,9 @@ class Exception extends \Exception {
$this->inner = $inner;
$this->setMessage($sql, $bindings);
// Set the exception code
$this->code = $inner->getCode();
}
/**
@@ -47,5 +50,5 @@ class Exception extends \Exception {
$this->message .= "\n\nSQL: ".$sql."\n\nBindings: ".var_export($bindings, true);
}
}