From 3c65de9d029a3832c2f9351c483e4404ae18cff0 Mon Sep 17 00:00:00 2001 From: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:06:42 +0530 Subject: [PATCH] Enhanced error message --- __tests__/distributors/semeru-installer.test.ts | 2 +- dist/setup/index.js | 2 +- src/distributions/semeru/installer.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/distributors/semeru-installer.test.ts b/__tests__/distributors/semeru-installer.test.ts index 8220660e..c5e7017e 100644 --- a/__tests__/distributors/semeru-installer.test.ts +++ b/__tests__/distributors/semeru-installer.test.ts @@ -207,7 +207,7 @@ describe('findPackageForDownload', () => { }); distribution['getAvailableVersions'] = async () => []; await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( - `Unsupported architecture for IBM Semeru: ${arch}, is not supported for IBM Semeru 8 on your current OS version. Please refer to IBM Semeru documentation or support resources to verify compatibility with your OS.` + `Unsupported architecture: ${arch} is not supported for IBM Semeru 8 on your current OS version. Please refer to IBM Semeru documentation or support resources to verify compatibility with your OS.` ); } ); diff --git a/dist/setup/index.js b/dist/setup/index.js index d57f314b..5916ead5 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -124940,7 +124940,7 @@ class SemeruDistribution extends base_installer_1.JavaBase { findPackageForDownload(version) { return __awaiter(this, void 0, void 0, function* () { if (!supportedArchitectures.includes(this.architecture)) { - throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture}, is not supported for IBM Semeru ${this.version} on your current OS version. Please refer to IBM Semeru documentation or support resources to verify compatibility with your OS.`); + throw new Error(`Unsupported architecture: ${this.architecture} is not supported for IBM Semeru ${this.version} on your current OS version. Please refer to IBM Semeru documentation or support resources to verify compatibility with your OS.`); } if (!this.stable) { throw new Error('IBM Semeru does not provide builds for early access versions'); diff --git a/src/distributions/semeru/installer.ts b/src/distributions/semeru/installer.ts index 80700b17..fec1b201 100644 --- a/src/distributions/semeru/installer.ts +++ b/src/distributions/semeru/installer.ts @@ -35,7 +35,7 @@ export class SemeruDistribution extends JavaBase { ): Promise { if (!supportedArchitectures.includes(this.architecture)) { throw new Error( - `Unsupported architecture for IBM Semeru: ${this.architecture}, is not supported for IBM Semeru ${this.version} on your current OS version. Please refer to IBM Semeru documentation or support resources to verify compatibility with your OS.` + `Unsupported architecture: ${this.architecture} is not supported for IBM Semeru ${this.version} on your current OS version. Please refer to IBM Semeru documentation or support resources to verify compatibility with your OS.` ); }