summaryrefslogtreecommitdiff
path: root/framework/Exceptions
diff options
context:
space:
mode:
authorxue <>2007-09-26 16:05:56 +0000
committerxue <>2007-09-26 16:05:56 +0000
commit7eac7385fe027a649a4f4440fb60e16bfa36647f (patch)
tree1fd1b309e094da5b3dab82a6008b7f440dce2084 /framework/Exceptions
parent29a57442de5a66af7601858b5d48e9e80aaa79a4 (diff)
minor code refactoring.
Diffstat (limited to 'framework/Exceptions')
-rw-r--r--framework/Exceptions/TException.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/framework/Exceptions/TException.php b/framework/Exceptions/TException.php
index a74b76e4..e3a700b2 100644
--- a/framework/Exceptions/TException.php
+++ b/framework/Exceptions/TException.php
@@ -64,9 +64,7 @@ class TException extends Exception
protected function translateErrorMessage($key)
{
$msgFile=$this->getErrorMessageFile();
- if(($entries=@file($msgFile))===false)
- return $key;
- else
+ if(($entries=@file($msgFile))!==false)
{
foreach($entries as $entry)
{
@@ -74,8 +72,8 @@ class TException extends Exception
if(trim($code)===$key)
return trim($message);
}
- return $key;
}
+ return $key;
}
/**