/** * exception thrown when a method's input parameter has a type that cannot * be processed * * @param string $type * the data type that is not supported */ public function __construct($type) { // our list of args, in case someone wants to dig deeper into // what went wrong $data = $this->buildErrorData($type); // what do we want to tell our error handler? $msg = $this->buildErrorMessage($data['type'], $data['caller']); // all done parent::__construct(400, $msg, $data); }
/** * @param mixed $repoDir * the folder that was rejected */ public function __construct($repoDir) { $msg = "'" . ConvertToString::from($repoDir) . "' is not a valid Git repo root folder"; parent::__construct(400, $msg); }