summaryrefslogtreecommitdiff
path: root/framework/Exceptions/TException.php
diff options
context:
space:
mode:
authorxue <>2005-11-17 15:28:20 +0000
committerxue <>2005-11-17 15:28:20 +0000
commitaa2edcf52ee7438876d826283274bf7e271fad4a (patch)
tree0028051b95e14fb09f52b993122910d2ef7a2fe8 /framework/Exceptions/TException.php
parentb4f41b167b62bb628d0809fc0e9438e11dce2bb5 (diff)
Modified how errors are handled.
Diffstat (limited to 'framework/Exceptions/TException.php')
-rw-r--r--framework/Exceptions/TException.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/Exceptions/TException.php b/framework/Exceptions/TException.php
index 0c51e1f1..0bc963f8 100644
--- a/framework/Exceptions/TException.php
+++ b/framework/Exceptions/TException.php
@@ -51,8 +51,9 @@ class TException extends Exception
protected function translateErrorCode($key)
{
- // $msgFile=dirname(__FILE__).'/messages.'.Prado::getLocale();
- // if(!is_file($msgFile))
+ $languages=Prado::getUserLanguages();
+ $msgFile=dirname(__FILE__).'/messages.'.$languages[0];
+ if(!is_file($msgFile))
$msgFile=dirname(__FILE__).'/messages.en';
if(($entries=@file($msgFile))===false)
return $key;