1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-11 16:44:30 +02:00

Throw entire callstack for interbase-based databases. The errors given by firebird are multiline, exceptions get thrown from inside the logic. (.*) matches everything up until first line by default - this mitigates the problem and mathes the entire rest of the string (= including multilines)

This commit is contained in:
Pavel Ptacek
2013-04-11 04:51:09 +02:00
parent 2c9cbe9b0c
commit 9b4d58878c

View File

@@ -390,7 +390,7 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD
if (DibiDriverException::catchError($msg)) { if (DibiDriverException::catchError($msg)) {
if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) { if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) {
preg_match('/exception (\d+) (\w+) (.*)/i', ibase_errmsg(), $match); preg_match('/exception (\d+) (\w+) (.*)/is', ibase_errmsg(), $match);
throw new DibiProcedureException($match[3], $match[1], $match[2], dibi::$sql); throw new DibiProcedureException($match[3], $match[1], $match[2], dibi::$sql);
} else { } else {