1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-03 20:57:36 +02:00

DibiConnection::test() shows complete error message

This commit is contained in:
David Grudl
2012-01-19 03:31:18 +01:00
parent 3f2e383b47
commit b87d3cab81

View File

@@ -287,7 +287,11 @@ class DibiConnection extends DibiObject
return TRUE;
} catch (DibiException $e) {
dibi::dump($e->getSql());
if ($e->getSql()) {
dibi::dump($e->getSql());
} else {
echo get_class($e) . ': ' . $e->getMessage() . (PHP_SAPI === 'cli' ? "\n" : '<br>');
}
return FALSE;
}
}