From 8a425a791745f9fc73aa8bacd52a9d34cd2e5ad8 Mon Sep 17 00:00:00 2001 From: Alessandro Chitolina Date: Fri, 2 Feb 2024 16:47:10 +0100 Subject: [PATCH] [Exceptions] minor: define exceptions in globalThis instead of global --- src/Exception/CommandNotFoundException.js | 2 +- src/Exception/InvalidArgumentException.js | 2 +- src/Exception/InvalidOptionException.js | 2 +- src/Exception/LogicException.js | 2 +- src/Exception/RuntimeException.js | 2 +- src/Input/Input.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Exception/CommandNotFoundException.js b/src/Exception/CommandNotFoundException.js index 676dfe4..509e0a2 100644 --- a/src/Exception/CommandNotFoundException.js +++ b/src/Exception/CommandNotFoundException.js @@ -1,4 +1,4 @@ -const BaseException = global.InvalidArgumentException; +const BaseException = globalThis.InvalidArgumentException; const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface; /** diff --git a/src/Exception/InvalidArgumentException.js b/src/Exception/InvalidArgumentException.js index 0399951..fae84b6 100644 --- a/src/Exception/InvalidArgumentException.js +++ b/src/Exception/InvalidArgumentException.js @@ -1,4 +1,4 @@ -const BaseException = global.InvalidArgumentException; +const BaseException = globalThis.InvalidArgumentException; const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface; /** diff --git a/src/Exception/InvalidOptionException.js b/src/Exception/InvalidOptionException.js index 1184ec1..d49ee31 100644 --- a/src/Exception/InvalidOptionException.js +++ b/src/Exception/InvalidOptionException.js @@ -1,4 +1,4 @@ -const BaseException = global.InvalidArgumentException; +const BaseException = globalThis.InvalidArgumentException; const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface; /** diff --git a/src/Exception/LogicException.js b/src/Exception/LogicException.js index 6fee5ce..28b454d 100644 --- a/src/Exception/LogicException.js +++ b/src/Exception/LogicException.js @@ -1,4 +1,4 @@ -const BaseException = global.LogicException; +const BaseException = globalThis.LogicException; const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface; /** diff --git a/src/Exception/RuntimeException.js b/src/Exception/RuntimeException.js index ae24b95..2508af4 100644 --- a/src/Exception/RuntimeException.js +++ b/src/Exception/RuntimeException.js @@ -1,4 +1,4 @@ -const BaseException = global.RuntimeException; +const BaseException = globalThis.RuntimeException; const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface; /** diff --git a/src/Input/Input.js b/src/Input/Input.js index 86751f8..fca675c 100644 --- a/src/Input/Input.js +++ b/src/Input/Input.js @@ -69,7 +69,7 @@ export default class Input extends implementationOf(StreamableInputInterface) { * Parses the options and arguments. */ parse() { - throw new global.LogicException('You must override parse method'); + throw new LogicException('You must override parse method'); } /**