From 7c2c6fd37881dd238855cae4a0d0a21d0d44111a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 3 Jul 2023 00:37:00 +0200 Subject: [PATCH] refactor: refine error type in helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 647edcb9..fb449213 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -166,7 +166,7 @@ export class Utils { scale = 2 ): number { if (fluctuationPercent < 0 || fluctuationPercent > 100) { - throw new Error( + throw new RangeError( `Fluctuation percent must be between 0 and 100. Actual value: ${fluctuationPercent}` ); } -- 2.34.1