(Yaf >=1.0.0)
Yaf_Request_Abstract::getException — Retrieve the exception
Retrieve the exception caught during dispatching.
This function has no parameters.
Example #1 Yaf_Request_Abstract::getException() example
<?php
// In the bootstrap, enable exception catching so that any exception
// thrown during dispatching is forwarded to the error action
Yaf_Dispatcher::getInstance()->catchException(true);
class ErrorController extends Yaf_Controller_Abstract
{
public function errorAction($exception)
{
var_dump($this->getRequest()->getException() === $exception);
}
}
?>The above example will output something similar to:
bool(true)