StopSignal
Class: StopSignal
Defined in: packages/tagscript/src/lib/Errors/index.ts:105
Thrown by a parser to end the render early, keeping everything rendered so far and appending
message. This is control flow rather than a failure, which is why it does not land in
Response.errors.
StopParser is built on it.
Example
public parse(ctx: Context) {
if (parseIf(ctx.tag.parameter!)) throw new StopSignal(ctx.tag.payload ?? '');
return '';
}Extends
Constructors
Constructor
new StopSignal(message?): StopSignal
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1080
Parameters
message?
string
Returns
StopSignal
Inherited from
Constructor
new StopSignal(message?, options?): StopSignal
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1080
Parameters
message?
string
options?
ErrorOptions
Returns
StopSignal
Inherited from
Properties
cause?
optional cause?: unknown
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from
message
message: string
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from
name
name: string = 'StopSignal'
Defined in: packages/tagscript/src/lib/Errors/index.ts:106
Overrides
stack?
optional stack?: string
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Methods
isError()
static isError(error): error is Error
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error