public function __construct($message) { // If the input is an array, convert it to a string of errors if (is_array($message)) { $message = implode(", ", $message); } // Supply the base exception class with an arbitrary code value parent::__construct($message, 0); }
/** * IncompleteEntityException constructor. * @param string $propertyName */ public function __construct($propertyName) { $this->propertyName = $propertyName; parent::__construct("Property {$this->propertyName} cannot be null."); }
/** * InvalidClassException constructor. * @param string $calledObject * @param string $class * @param string $requiredClass */ public function __construct($calledObject, $class, $requiredClass) { parent::__construct("Call to object {$calledObject} requires child class of {$requiredClass}, got: {$class}"); }
/** * NoReferenceException constructor. * @param string $column */ public function __construct($column) { $this->column = $column; parent::__construct("Could not find reference for column `{$column}`."); }