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
commit c397c26a7b
1 changed files with 4 additions and 1 deletions

View File

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