66
77# Class: CliError
88
9- Defined in: [ src/error.ts:132 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L132 )
9+ Defined in: [ src/error.ts:141 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L141 )
1010
1111Represents a CLI-specific error with suggested exit code and other
1212properties. As ` CliError ` has built-in support for cause chaining, this class
@@ -32,7 +32,7 @@ can be used as a simple wrapper around other errors.
3232
3333> ** new CliError** (` reason ` ?, ` options ` ?): [ ` CliError ` ] ( CliError.md )
3434
35- Defined in: [ src/error.ts:142 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L142 )
35+ Defined in: [ src/error.ts:151 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L151 )
3636
3737Represents a CLI-specific error, optionally with suggested exit code and
3838other context.
@@ -59,7 +59,7 @@ other context.
5959
6060> ** new CliError** (` reason ` , ` options ` , ` message ` , ` superOptions ` ): [ ` CliError ` ] ( CliError.md )
6161
62- Defined in: [ src/error.ts:147 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L147 )
62+ Defined in: [ src/error.ts:156 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L156 )
6363
6464This constructor syntax is used by subclasses when calling this constructor
6565via ` super ` .
@@ -96,7 +96,7 @@ via `super`.
9696
9797> ** \[ $type\] ** : ` string ` [ ]
9898
99- Defined in: [ src/error.ts:137 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L137 )
99+ Defined in: [ src/error.ts:146 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L146 )
100100
101101***
102102
@@ -120,7 +120,7 @@ Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
120120
121121> ** dangerouslyFatal** : ` boolean ` = ` false `
122122
123- Defined in: [ src/error.ts:135 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L135 )
123+ Defined in: [ src/error.ts:144 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L144 )
124124
125125This option is similar in intent to yargs's ` exitProcess() ` function,
126126except applied more granularly.
@@ -177,13 +177,20 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
177177
178178### showHelp
179179
180- > ** showHelp** : ` boolean ` = ` false `
180+ > ** showHelp** : ` undefined ` \| ` boolean ` \| ` "full" ` \| ` "short" ` \| ` "default" `
181181
182- Defined in: [ src/error.ts:134 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L134 )
182+ Defined in: [ src/error.ts:143 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L143 )
183183
184- If ` true ` , help text will be sent to stderr _ before this exception finishes
185- bubbling_ . Where the exception is thrown will determine which instance is
186- responsible for error text generation.
184+ If truthy, help text will be sent to stderr _ before this exception finishes
185+ bubbling_ .
186+
187+ Specifically, if ` showHelp ` is set to ` "full" ` , the full help text will be
188+ sent to stderr, including the entire ` usage ` string. If set to ` "short" `
189+ (or ` true ` ), the same help text will be sent to stderr except only the
190+ first line of usage will be included. If set to ` "default" ` , the value of
191+ ` ExecutionContext::state.showHelpOnFail ` will be used. If set to
192+ ` false ` (the default), no help text will be sent to stderr related to this
193+ error.
187194
188195#### Default
189196
@@ -213,7 +220,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
213220
214221> ** suggestedExitCode** : [ ` FrameworkExitCode ` ] ( ../enumerations/FrameworkExitCode.md ) = ` FrameworkExitCode.DefaultError `
215222
216- Defined in: [ src/error.ts:133 ] ( https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a /src/error.ts#L133 )
223+ Defined in: [ src/error.ts:142 ] ( https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e /src/error.ts#L142 )
217224
218225The exit code that will be returned when the application exits, given
219226nothing else goes wrong in the interim.
0 commit comments