summaryrefslogtreecommitdiff
path: root/framework/Exceptions/TErrorHandler.php
diff options
context:
space:
mode:
authorxue <>2005-11-22 12:39:09 +0000
committerxue <>2005-11-22 12:39:09 +0000
commit12a74128ad47e706fd0acc6a3367cbe8bd4e7f1e (patch)
treed1efdcf657b9a488ba10ae5666d513cb94bfd3a9 /framework/Exceptions/TErrorHandler.php
parentb404b6fed5dc814ceb2cf03a17b20ff9d6da775d (diff)
Diffstat (limited to 'framework/Exceptions/TErrorHandler.php')
-rw-r--r--framework/Exceptions/TErrorHandler.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/Exceptions/TErrorHandler.php b/framework/Exceptions/TErrorHandler.php
index 779224ca..592ba615 100644
--- a/framework/Exceptions/TErrorHandler.php
+++ b/framework/Exceptions/TErrorHandler.php
@@ -175,7 +175,7 @@ class TErrorHandler extends TComponent implements IModule
if(!($exception instanceof THttpException))
error_log($exception->__toString());
if($this->_templatePath===null)
- $this->_templatePath=dirname(__FILE__);
+ $this->_templatePath=Prado::getFrameworkPath().'/Exceptions/templates';
$base=$this->_templatePath.'/'.self::ERROR_FILE_NAME;
$lang=Prado::getPreferredLanguage();
if(is_file("$base$statusCode-$lang.html"))
@@ -276,9 +276,9 @@ class TErrorHandler extends TComponent implements IModule
strftime('%Y-%m-%d %H:%m',time())
);
$lang=Prado::getPreferredLanguage();
- $exceptionFile=dirname(__FILE__).'/'.self::EXCEPTION_FILE_NAME.'-'.$lang.'.html';
+ $exceptionFile=Prado::getFrameworkPath().'/Exceptions/templates/'.self::EXCEPTION_FILE_NAME.'-'.$lang.'.html';
if(!is_file($exceptionFile))
- $exceptionFile=dirname(__FILE__).'/'.self::EXCEPTION_FILE_NAME.'.html';
+ $exceptionFile=Prado::getFrameworkPath().'/Exceptions/templates/'.self::EXCEPTION_FILE_NAME.'.html';
if(($content=@file_get_contents($exceptionFile))===false)
die("Unable to open exception template file '$exceptionFile'.");
echo str_replace($fields,$values,$content);