Example #1
0
 /**
  * This function instantiates the exception with the specified message,
  * variables, and code.
  *
  * @access public
  * @param string $message                    the message
  * @param array $variables                   the variables
  * @param integer $code                      the code
  * @return Throwable_OutOfBounds_Exception   the exception
  */
 public function __construct($message, array $variables = NULL, $code = 0)
 {
     // Set the message
     $message = __($message, $variables);
     // Pass the message to the parent
     parent::__construct($message, $code);
 }
 public function __construct($message = null, $code = 0, \Exception $previous = null, $httpStatus = 500, $details = null)
 {
     $this->_httpStatus = $httpStatus;
     if ($details !== null) {
         $this->_details = $details;
     }
     parent::__construct($message, $code, $previous);
 }
 public function __construct($message = 'Expected specific item in array/collection not found', $code = 0, $previous = NULL)
 {
     parent::__construct($message, $code, $previous);
 }
 public function __construct($name, $type, \Exception $previous = null)
 {
     parent::__construct(sprintf('The %s spec named %s was not found.', $type, $name), 0, $previous);
 }
 public function __construct($alias, $code = 0, $previous = NULL)
 {
     parent::__construct("Expectation with {$alias} could not be found.", $code, $previous);
 }
Example #6
0
 /**
  * This constructor creates a new Out-Of-Bounds Exception.
  *
  * @access public
  * @param string $message                                   the error message
  * @param array $variables                                  the translation variables
  * @param integer $code                                     the exception code
  */
 public function __construct($message = '', array $variables = null, $code = 0)
 {
     parent::__construct(empty($variables) ? (string) $message : strtr((string) $message, $variables), (int) $code);
     $this->code = (int) $code;
     // Known bug: http://bugs.php.net/39615
 }
 public function __construct($message, array $allowedMethods, $code = 0, \Exception $previous = NULL)
 {
     parent::__construct($message, $code, $previous);
     $this->allowedMethods = $allowedMethods;
 }
 /**
  * Конструктор
  * 
  */
 public function __construct($message, $code, $file, $line)
 {
     $this->file = $file;
     $this->line = $line;
     parent::__construct($message, $code);
 }
Example #9
0
 public function __construct($message = null)
 {
     parent::__construct($this->getText($message));
 }
Example #10
0
 public function __construct($uid, $mode = NULL)
 {
     if ($mode !== NULL) {
         if ($mode == User::GET_BY_ID) {
             $mode = 'id:';
         }
         if ($mode == User::GET_BY_USERNAME) {
             $mode = 'username:';
         }
     }
     parent::__construct("Requested User does not exist: {$mode}{$uid}");
 }
 /**
  * MOutOfBoundsException constructor.
  * @param int $min
  * @param int $max
  * @param int $required
  */
 public function __construct($min, $max, $required)
 {
     parent::__construct(printf("The required item as position %s is not between %s and %s", $required, $min, $max));
 }
Example #12
0
 /**
  * @param mixed $id
  */
 public function __construct($id)
 {
     parent::__construct(sprintf('Cart with id "%s" cannot be found in this store', $id));
 }
 public function __construct($message = "", $code = 0, $previous = null)
 {
     parent::__construct($message, $code, $previous);
     //todo: generate error code.
 }
Example #14
0
 /**
  * @param mixed $id
  */
 public function __construct($id)
 {
     parent::__construct(sprintf('Item with id "%s" cannot be found in this cart', $id));
 }
 public function __construct($id, $message = "", $code = 0, \Exception $previous = null)
 {
     $this->id = $id;
     parent::__construct($message, $code, $previous);
 }
 public function __construct($message = 'Key not found in array/collection', $code = 0, $previous = NULL)
 {
     parent::__construct($message, $code, $previous);
 }
Example #17
0
 /**
  * This constructor creates a new runtime exception.
  *
  * @access public
  * @param string $message                                   the error message
  * @param array $values                                     the value to be formatted
  * @param IInt32\Type $code                                  the exception code
  */
 public function __construct($message = '', array $values = null, IInt32\Type $code = null)
 {
     parent::__construct(empty($values) ? (string) $message : strtr((string) $message, $values), IInt32\Module::nvl($code)->unbox());
 }
Example #18
0
 /**
  * The constructor does what you would expect it to.
  *
  * @author Daniel Sherman
  * @param string $message the message for the exception
  * @param integer $code the code for the exception
  * @param \Exception $previous A previous exception
  * @param array $context the array that will be returned along with the
  * exception.
  * @uses setId
  * @uses context
  */
 public function __construct($message = null, $code = 0, $previous = null, array $context = [])
 {
     parent::__construct($message, $code, $previous);
     $this->setId();
     $this->context = $context;
 }
 public function __construct($name)
 {
     parent::__construct(sprintf('Field %s was not found.', $name));
 }