rawMessage = $message; parent::__construct(sprintf('Exit: %s', $message), $code, $previous); } /** * Return a raw (unformatted) version of the error message. * * @return string */ public function getRawMessage() { return $this->rawMessage; } /** * Throws BreakException. * * Since `throw` can not be inserted into arbitrary expressions, it wraps with function call. * * @throws BreakException */ public static function exitShell() { throw new self('Goodbye'); } }