summaryrefslogtreecommitdiff
path: root/framework/Exceptions
diff options
context:
space:
mode:
authorxue <>2006-02-23 03:37:43 +0000
committerxue <>2006-02-23 03:37:43 +0000
commit697285390a0495dc839d43806bb5b3dddf2f3af7 (patch)
tree181cf110daf9dcc850fda79cd3d969f78701443d /framework/Exceptions
parentac0770651d6879c93d321bd083fe0f11de79940e (diff)
Fixed an issue caused by a change due to PHP 5.1.2
Diffstat (limited to 'framework/Exceptions')
-rw-r--r--framework/Exceptions/TException.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/framework/Exceptions/TException.php b/framework/Exceptions/TException.php
index 1ad86f12..60b47193 100644
--- a/framework/Exceptions/TException.php
+++ b/framework/Exceptions/TException.php
@@ -72,10 +72,20 @@ class TException extends Exception
return $this->_errorCode;
}
+ public function setErrorCode($code)
+ {
+ $this->_errorCode=$code;
+ }
+
public function getErrorMessage()
{
return $this->getMessage();
}
+
+ protected function setErrorMessage($message)
+ {
+ $this->message=$message;
+ }
}
class TSystemException extends TException
@@ -152,10 +162,13 @@ class THttpException extends TSystemException
public function __construct($statusCode,$errorMessage)
{
+ $this->_statusCode=$statusCode;
+ $this->setErrorCode($errorMessage);
$args=func_get_args();
array_shift($args);
- call_user_func_array(array('TException', '__construct'), $args);
- $this->_statusCode=TPropertyValue::ensureInteger($statusCode);
+ $args[0]=$this->translateErrorMessage($errorMessage);
+ $str=call_user_func_array('sprintf',$args);
+ $this->setErrorMessage($str);
}
public function getStatusCode()