/**
  * @param mixed $method
  * @return void
  */
 protected function dispatch($method)
 {
     if (!$this->dispatcher) {
         return;
     }
     $arguments = func_get_args();
     unset($arguments[0]);
     $this->dispatcher->dispatch($method, $arguments);
 }
 private function dispatchOnException($exception) {
   $this->dispatch(
     'onException',
     $exception,
     $this->dispatcher->getDefaultDriver()
   );
   throw $exception;
 }