Skip to content

Commit

Permalink
[Exceptions] minor: define exceptions in globalThis instead of global
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Feb 2, 2024
1 parent 71ce0bd commit 8a425a7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Exception/CommandNotFoundException.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BaseException = global.InvalidArgumentException;
const BaseException = globalThis.InvalidArgumentException;
const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BaseException = global.InvalidArgumentException;
const BaseException = globalThis.InvalidArgumentException;
const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidOptionException.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BaseException = global.InvalidArgumentException;
const BaseException = globalThis.InvalidArgumentException;
const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/LogicException.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BaseException = global.LogicException;
const BaseException = globalThis.LogicException;
const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BaseException = global.RuntimeException;
const BaseException = globalThis.RuntimeException;
const ExceptionInterface = Jymfony.Component.Console.Exception.ExceptionInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit 8a425a7

Please sign in to comment.