-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom error to be used for when attempting to prevent Commander Js's call to process.exit()
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Throwable } from "@aedart/contracts/support/exceptions"; | ||
import { configureCustomError } from "@aedart/support/exceptions"; | ||
|
||
/** | ||
* Skip Process Exit Error | ||
*/ | ||
export default class SkipProcessExitError extends Error implements Throwable | ||
{ | ||
/** | ||
* Create new Skip Process Exit Error instance | ||
* | ||
* @param {string} [message] | ||
* @param {ErrorOptions} [options] | ||
*/ | ||
constructor(message?: string, options?: ErrorOptions) | ||
{ | ||
super(message, options); | ||
|
||
configureCustomError(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import SkipProcessExitError from "./SkipProcessExitError"; | ||
export { | ||
SkipProcessExitError | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ import CliApplication from "./CliApplication"; | |
export { | ||
CliApplication | ||
} | ||
|
||
export * from './exceptions/index'; |