Example #1
0
 protected function handleReflectionException(\ReflectionException $e, $controller_name, $client_method_string)
 {
     if (strstr($e->getMessage(), 'Class ' . $controller_name . ' does not exist')) {
         throw new MethodNotFoundException($client_method_string);
     } else {
         throw new InternalErrorException('Unknown error occurred');
     }
 }
 /**
  * ReflectionException caught
  *
  * @param \ReflectionException $e
  *   RflectionException caught
  *
  * @return \Next\Controller\Dispatcher\DispatcherException
  *   Exception for caught ReflectionException
  */
 public static function reflection(\ReflectionException $e)
 {
     return new self($e->getMessage(), self::REFLECTION);
 }
 /**
  * Constructs a new exception instance.
  *
  * @param string $className Name of the searched class or interface.
  */
 public function __construct($className)
 {
     parent::__construct('Cannot resolve a pathname for class ' . $className);
 }