refactor: refine error type in helper
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 2 Jul 2023 22:37:00 +0000 (00:37 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 2 Jul 2023 22:37:00 +0000 (00:37 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/Utils.ts

index 647edcb9f88ad6b2674d8b82a051b75a443bba18..fb4492139e8367ff16634af861e51e4d1cf9c106 100644 (file)
@@ -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}`
       );
     }