/** * Create a new decorator not found exception. * * @param string $class * @param string|null $message * * @return void */ public function __construct($class, $message = null) { if (!$message) { $message = "The decorator class '{$class}' was not found."; } parent::__construct($class, $message); }
/** * Create a new method not found exception. * * @param string $class * @param string $method * @param string|null $message * * @return void */ public function __construct($class, $method, $message = null) { $this->method = $method; if (!$message) { $message = "The method '{$method}' was not found on the presenter class '{$class}'."; } parent::__construct($class, $message); }
/** * Called when the exception is constructed * * @param string[] $properties the exception's properties * @return self * @throws InvalidArgumentException if $names is neither a string nor array * @since 0.1.0 */ public function __construct($names) { parent::__construct($names); if (count($this->names) === 1) { $this->message = "Property {$this->names[0]} could not be found"; } else { $this->message = "The following properties could not be found: " . implode(', ', $this->names); } return; }
/** * Constructor * * @param string $file Filename * @param string $fileType File type * @param int $code Error code * @param \Exception $previous Previous Exception */ public function __construct($file, $fileType, $code = 0, \Exception $previous = null) { parent::__construct('File ' . $file . ' [' . $fileType . ']', basename($file), $code, $previous); }