setException($exception); } /** * Set the exception to be thrown * * @param Exception $exception * @return ExceptionEvent */ public function setException(Exception $exception) { $this->exception = $exception; return $this; } /** * Get the exception to be thrown * * @return Exception */ public function getException() { return $this->exception; } /** * Throw the exception or use the result * * @param bool $flag * @return ExceptionEvent */ public function setThrowException($flag) { $this->throwException = (bool) $flag; return $this; } /** * Throw the exception or use the result * * @return bool */ public function getThrowException() { return $this->throwException; } }