From 3ae995f03c8f60c4a4c9718262545cf5a6a08da3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 May 2015 18:35:18 +0200 Subject: Tweak uncaught exception message display This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions. --- ext/pdo_mysql/tests/bug_37445.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt | 2 +- ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/pdo_mysql/tests') diff --git a/ext/pdo_mysql/tests/bug_37445.phpt b/ext/pdo_mysql/tests/bug_37445.phpt index 20a73ce703..241c3f84e8 100644 --- a/ext/pdo_mysql/tests/bug_37445.phpt +++ b/ext/pdo_mysql/tests/bug_37445.phpt @@ -17,7 +17,7 @@ $stmt = $db->prepare("SELECT 1"); $stmt->bindParam(':a', 'b'); ?> --EXPECTF-- -Fatal error: Uncaught exception 'EngineException' with message 'Cannot pass parameter 2 by reference' in %sbug_37445.php:%d +Fatal error: Uncaught EngineException: Cannot pass parameter 2 by reference in %sbug_37445.php:%d Stack trace: #0 {main} thrown in %sbug_37445.php on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt index aee3e901a0..b31ad352b4 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt @@ -152,7 +152,7 @@ array(1) { } } -Fatal error: Uncaught exception 'EngineException' with message 'Cannot instantiate abstract class mystatement6' in %s:%d +Fatal error: Uncaught EngineException: Cannot instantiate abstract class mystatement6 in %s:%d Stack trace: #0 %s(%d): PDO->query('SELECT id, labe...') #1 {main} diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 05f7de80e9..2076723344 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -93,7 +93,7 @@ array(1) { Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function execute() on boolean' in %s:%d +Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index d0201a1a76..66ee0eedc9 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -36,7 +36,7 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function execute() on boolean' in %s:%d +Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index 61a9702d52..06a6a418f9 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -56,7 +56,7 @@ Testing native PS... Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function execute() on boolean' in %s:%d +Fatal error: Uncaught EngineException: Call to a member function execute() on boolean in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index 0c2e75d2be..1caa875a32 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -99,7 +99,7 @@ Native Prepared Statements... Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d -Fatal error: Uncaught exception 'EngineException' with message 'Call to a member function errorInfo() on boolean' in %s:%d +Fatal error: Uncaught EngineException: Call to a member function errorInfo() on boolean in %s:%d Stack trace: #0 %s(%d): mysql_stmt_multiquery_wrong_usage(Object(PDO)) #1 {main} -- cgit v1.2.1