public function parse() { $error = (string) $this->data; $exceptionClass = $this->getExceptionClass($error); return new $exceptionClass($error); }