mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
Show the last error a bit more clearly if available
This commit is contained in:
parent
f64c662124
commit
e527665c5c
@ -214,7 +214,8 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
* Throw a database error
|
* Throw a database error
|
||||||
*/
|
*/
|
||||||
function databaseError($message, $errorLevel = E_USER_ERROR) {
|
function databaseError($message, $errorLevel = E_USER_ERROR) {
|
||||||
$message .= "\n" . $this->getLastError();
|
$lastError = $this->getLastError();
|
||||||
|
if($lastError) $message .= "\nLast error: " . $lastError;
|
||||||
return parent::databaseError($message, $errorLevel);
|
return parent::databaseError($message, $errorLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user