Esempio n. 1
0
 /**
  * Creates a new translated exception.
  *
  *     throw new Kohana_Exception('Something went terrible wrong, :user',
  *         array(':user' => $user));
  *
  * @param   string|array   status message, custom content to display with error.
  *                         Can also be an array with the "error" message and the "field" name.
  * @param   array          translation variables
  * @param   integer        the http status code
  * @return  void
  */
 public function __construct($message = NULL, array $variables = NULL, Exception $previous = NULL)
 {
     if (is_array($message)) {
         $this->_field = $message['field'];
         $message = $message['error'];
     }
     parent::__construct($message, $variables, $previous);
 }