summaryrefslogtreecommitdiff
path: root/framework/core.php
diff options
context:
space:
mode:
authorxue <>2006-01-29 00:46:56 +0000
committerxue <>2006-01-29 00:46:56 +0000
commitb703e05d9154845b6e5c6f1bf20b0a42df7c3613 (patch)
treebc327f9a4ab76c82b3fc19114292a3ee9c928d27 /framework/core.php
parent568a5cea4833a3316f3741dcd32699334f770d26 (diff)
Enhanced error report for template parser.
Diffstat (limited to 'framework/core.php')
-rw-r--r--framework/core.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/framework/core.php b/framework/core.php
index 293209d0..6c31bc55 100644
--- a/framework/core.php
+++ b/framework/core.php
@@ -538,9 +538,17 @@ class PradoBase
return;
if(($pos=strrpos($namespace,'.'))===false) // a class name
{
- include_once($namespace.self::CLASS_FILE_EXT);
- if(!class_exists($namespace,false))
- throw new TInvalidOperationException('prado_component_unknown',$namespace);
+ try
+ {
+ include_once($namespace.self::CLASS_FILE_EXT);
+ }
+ catch(Exception $e)
+ {
+ if(!class_exists($namespace,false))
+ throw new TInvalidOperationException('prado_component_unknown',$namespace);
+ else
+ throw $e;
+ }
}
else if(($path=self::getPathOfNamespace($namespace,self::CLASS_FILE_EXT))!==null)
{
@@ -561,7 +569,19 @@ class PradoBase
{
self::$_usings[$namespace]=$path;
if(!class_exists($className,false))
- include_once($path);
+ {
+ try
+ {
+ include_once($path);
+ }
+ catch(Exception $e)
+ {
+ if(!class_exists($className,false))
+ throw new TInvalidOperationException('prado_component_unknown',$className);
+ else
+ throw $e;
+ }
+ }
}
else
throw new TInvalidDataValueException('prado_using_invalid',$namespace);