[+] Classes: Add PHP exceptions support + handler

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8797 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-27 12:10:47 +00:00
parent 7c32b171cd
commit 80e750c4c9
21 changed files with 410 additions and 50 deletions
+4 -2
View File
@@ -78,7 +78,10 @@ class Autoload
public function load($classname)
{
// regenerate the class index if the requested class is not found in the index or if the requested file doesn't exists
if (!isset($this->index[$classname]) || ($this->index[$classname] && !file_exists($this->root_dir.$this->index[$classname])))
if (!isset($this->index[$classname])
|| ($this->index[$classname] && !is_file($this->root_dir.$this->index[$classname]))
|| (isset($this->index[$classname.'Core']) && $this->index[$classname.'Core'] && !is_file($this->root_dir.$this->index[$classname]))
)
$this->generateIndex();
// If $classname has not core suffix (E.g. Shop, Product)
@@ -87,7 +90,6 @@ class Autoload
// If requested class does not exist, load associated core class
if (isset($this->index[$classname]) && !$this->index[$classname])
{
require_once($this->root_dir.$this->index[$classname.'Core']);
if (file_exists($this->root_dir.'override/'.$this->index[$classname.'Core']))
{