Tagscript

StopSignal

TagScript


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

TagScriptError.constructor

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

TagScriptError.constructor

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

TagScriptError.cause


message

message: string

Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from

TagScriptError.message


name

name: string = 'StopSignal'

Defined in: packages/tagscript/src/lib/Errors/index.ts:106

Overrides

TagScriptError.name


stack?

optional stack?: string

Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

TagScriptError.stack

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

Inherited from

TagScriptError.isError

On this page