From bd0abbf49cbc1bc15d2c01ccd8aeba2cb8a91216 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 25 Nov 2006 03:58:33 +0000 Subject: Added exception messages. --- framework/Data/TDbCommand.php | 2 +- framework/Data/TDbConnection.php | 4 ---- framework/Exceptions/messages.txt | 12 +++++++++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php index 7ae32d17..91b165fa 100644 --- a/framework/Data/TDbCommand.php +++ b/framework/Data/TDbCommand.php @@ -257,7 +257,7 @@ class TDbCommand extends TComponent } catch(Exception $e) { - throw new TDbException('dbcommand_queryscalar_failed',$e->getMessage()); + throw new TDbException('dbcommand_query_failed',$e->getMessage()); } } } diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php index 9ca57a4a..acb1aec1 100644 --- a/framework/Data/TDbConnection.php +++ b/framework/Data/TDbConnection.php @@ -285,8 +285,6 @@ class TDbConnection extends TComponent return TDbColumnCaseMode::LowerCase; case PDO::CASE_UPPER: return TDbColumnCaseMode::UpperCase; - default: - throw new TDbException('dbconnection_columncase_unknown'); } } @@ -323,8 +321,6 @@ class TDbConnection extends TComponent return TDbNullConversionMode::EmptyStringToNull; case PDO::NULL_TO_STRING: return TDbNullConversionMode::NullToEmptyString; - default: - throw new TDbException('dbconnection_nullconversion_unknown'); } } diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt index 40e5110e..f3032eb3 100644 --- a/framework/Exceptions/messages.txt +++ b/framework/Exceptions/messages.txt @@ -346,4 +346,14 @@ xmltransform_documentpath_invalid = TXmlTransform.DocumentPath '{0}' is invalid xmltransform_transform_required = Either TransformContent or TransformPath property must be set for TXmlTransform. ttriggeredcallback_invalid_controlid = ControlID property for '{0}' must not be empty. -tactivecustomvalidator_clientfunction_unsupported = {0} does not support client side validator function. \ No newline at end of file +tactivecustomvalidator_clientfunction_unsupported = {0} does not support client side validator function. + +dbconnection_open_failed = TDbConnection failed to establish DB connection: {0} +dbconnection_connection_inactive = TDbConnection is inactive. + +dbcommand_prepare_failed = TDbCommand failed to prepare the SQL statement: {0} +dbcommand_execute_failed = TDbCommand failed to execute the SQL statement: {0} +dbcommand_query_failed = TDbCommand failed to execute the query SQL: {0} +dbcommand_column_empty = TDbCommand returned an empty result and could not obtain the scalar. +dbdatareader_rewind_invalid = TDbDataReader is a forward-only stream. It can only be traversed once. +dbtransaction_transaction_inactive = TDbTransaction is inactive. -- cgit v1.2.3