protected function getMessageFromException($e)
    {
        // Note: duplicated from FormDatabaseSetup.isAccessDenied
        // Avoid leaking the username/db name when access denied
        if ($e->getCode() == 1044 || $e->getCode() == 42000) {
            return "Error while connecting to the Matomo database - please check your credentials in config/config.ini.php file";
        }

        if (Common::isPhpCliMode()) {
            return $e->getMessage() . "\n" . $e->getTraceAsString();
        }

        return $e->getMessage();
    }
protected function getMessageFromException($e)
    {
        // Note: duplicated from FormDatabaseSetup.isAccessDenied
        // Avoid leaking the username/db name when access denied
        if ($e->getCode() == 1044 || $e->getCode() == 42000) {
            return "Error while connecting to the Matomo database - please check your credentials in config/config.ini.php file";
        }

        if (Common::isPhpCliMode()) {
            return $e->getMessage() . "\n" . $e->getTraceAsString();
        }

        return $e->getMessage();
    }
protected function getMessageFromException ( $ e ) { // Note: duplicated from FormDatabaseSetup.isAccessDenied // Avoid leaking the username/db name when access denied if ( $ e -> getCode ( ) == 1044 || $ e -> getCode ( ) == 42000 ) { return "Error while connecting to the Matomo database - please check your credentials in config/config.ini.php file" ; } if ( Common :: isPhpCliMode ( ) ) { return $ e -> getMessage ( ) . "\n" . $ e -> getTraceAsString ( ) ; } return $ e -> getMessage ( ) ; }
Gets the error message to output when a tracking request fails.

@param Exception $e
@return string
Gets the error message to output when a tracking request fails .