/** * 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); }
/** * exception thrown when a method's input parameter is not an event * * @param string $item * the item that is not an event */ public function __construct($item) { $msg = "'" . $this->getTypeForMessage($item) . "' is not an Event"; // all done parent::__construct(400, $msg); }