Browse Source

[ZF-8034] echo exception message in the code

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18544 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 16 years ago
parent
commit
3dbb8b0a7f
1 changed files with 7 additions and 5 deletions
  1. 7 5
      library/Zend/Rest/Server.php

+ 7 - 5
library/Zend/Rest/Server.php

@@ -21,17 +21,17 @@
  */
 
 /**
- * Zend_Server_Interface
+ * @see Zend_Server_Interface
  */
 require_once 'Zend/Server/Interface.php';
 
 /**
- * Zend_Server_Reflection
+ * @see Zend_Server_Reflection
  */
 require_once 'Zend/Server/Reflection.php';
 
 /**
- * Zend_Server_Abstract
+ * @see Zend_Server_Abstract
  */
 require_once 'Zend/Server/Abstract.php';
 
@@ -598,9 +598,11 @@ class Zend_Rest_Server implements Zend_Server_Interface
                 $object = $this->_functions[$this->_method]->getDeclaringClass()->newInstance();
             }
         } catch (Exception $e) {
-            echo $e->getMessage();
             require_once 'Zend/Rest/Server/Exception.php';
-            throw new Zend_Rest_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $this->_functions[$this->_method]->getName(), 500);
+            throw new Zend_Rest_Server_Exception('Error instantiating class ' . $class .
+                                                 ' to invoke method ' . $this->_functions[$this->_method]->getName() .
+                                                 ' (' . $e->getMessage() . ') ',
+                                                 500);
         }
 
         try {