public function beforeException() {
        /**
         * @param \Phalcon\Events\Event $event
         * @param \Phalcon\Dispatcher $dispatcher
         * @param \Exception $exception
         * @return callable
         */
        return function(Event $event, Dispatcher $dispatcher, \Exception $exception) {
            $resolver = new ExceptionResolver();
            $resolver->setDI($dispatcher->getDI());
            $resolver->resolve($exception);

            return false;
        };
    }