OSDN Git Service

#17935 - Change to more detail exception.
authormumin <mumincacao@users.sourceforge.jp>
Fri, 24 Jul 2009 14:00:36 +0000 (23:00 +0900)
committermumin <mumincacao@users.sourceforge.jp>
Fri, 24 Jul 2009 14:00:36 +0000 (23:00 +0900)
documents/changes.en.txt
documents/changes.ja.txt
trust_path/modules/sd3rd/class/AssetManager.class.php
trust_path/modules/sd3rd/class/updater/UpdateUtils.class.php

index bb7c53d..a302eeb 100644 (file)
@@ -1,3 +1,4 @@
+#17935 - Change to more detail exception.
 #17934 - Append UpdateContext class.
 #17933 - Static method cannot use $this.
 #17932 - UpdateUtils::getFileList() required one argument.
index 9fc540e..775d113 100644 (file)
@@ -1,3 +1,4 @@
+#17935 - \97á\8aO\94­\90\8e\9e\82Ì\8f\88\97\9d\82ð\82»\82ê\82Á\82Û\82­\95Ï\8dX
 #17934 - \95¡\90\94\82Ó\82\9f\82¢\82é\82É\82Ü\82½\82ª\82é\82Å\81[\82½\82ð\95Û\8e\9d\82·\82é\82­\82ç\82·\82ð\92Ç\89Á
 #17933 - \82·\82½\82Ä\82¡\82Á\82­\82ß\82»\82Á\82Ç\82Å $this \82ð\8eg\82¨\82¤\82Æ\82µ\82Ä\93{\82ç\82ê\82Ä\82½\82Ì\82Å\8fC\90³
 #17932 - UpdateUtils::getFileList() \82É\88ø\90\94\82ð\93n\82µ\96Y\82ê\82Ä\82½\82Ì\82Å\8fC\90³
index ab129df..122413a 100644 (file)
@@ -44,10 +44,7 @@ class Sd3rd_AssetManager
     **/
     public function &getInstance(/*** string ***/ $dirname)
     {
-        /**
-         *  @var    Sd3rd_AssetManager[]
-        **/
-        static $instance = array();
+        static /*** Sd3rd_AssetManager{} ***/ $instance = array();
     
         if(!isset($instance[$dirname]))
         {
@@ -159,6 +156,11 @@ class Sd3rd_AssetManager
             }
         }
     
+        if($className == null)
+        {
+            throw new Exception('Request class is not found.'); /// @todo Use my exception?
+        }
+    
         if($type == 'handler')
         {
             $root =& XCube_Root::getSingleton();
index 3b78b7a..d9333bb 100644 (file)
@@ -124,7 +124,7 @@ class Sd3rd_UpdateUtils
         }
         if(!isset($cache[$mode][$name = self::makeClassName($mode,$name)]))
         {
-            throw new Sd3rd_InvalidClassException('Request process is not found.');
+            throw new Sd3rd_ProcessNotFoundException('Request process is not found.');
         }
         return $cache[$mode][$name];
     }
@@ -174,7 +174,7 @@ class Sd3rd_UpdateUtils
         require_once $file;
         if(!class_exists($class = self::makeClassNameFromPath($mode,$file)))
         {
-            throw new Sd3rd_ClassNotFoundException('Class not found.');
+            throw new Sd3rd_ClassNotFoundException(sprintf('Class "%s" is not found.',$class));
         }
         $instance = new $class();
         if(!$instance instanceof $type)