/** * Initializes this exception. * * @param \Ableron\Lib\Net\Uri $redirectUri The URI to redirect the client to */ public function __construct(Uri $redirectUri) { // initialize this exception parent::__construct(); // set redirect URI $this->redirectUri = $redirectUri; }
/** * Initializes this exception. * * @param array $fieldNames Names of the form fields which caused the exception * @param string $messageKey Message key of the error message to display * @param array $messageParameters List of parameters used in the error message */ public function __construct(array $fieldNames, string $messageKey, array $messageParameters = array()) { // init exception and set message parent::__construct(Application::getI18nHandler()->getTranslator()->translate($messageKey, $messageParameters)); // set field names $this->fieldNames = $fieldNames; }
/** * Logs the given exception. * * @param string $message The message to log * @param \Ableron\Core\Exception\SystemException $exception The exception to log * @return void */ public function logException(string $message, SystemException $exception) { $this->logMessage($this->toPsr3LogLevel($exception->getSeverity()), $message, array('exception' => $exception)); }