/** * Returns the exception message. * * @return string */ public function getExceptionMessage() { if ($this->exception === null) { return ''; } if ($this->exception instanceof PackageValidationException) { return $this->exception->getErrorMessage(); } return $this->exception->getMessage(); }