MCPcopy Create free account
hub / github.com/aiscript-dev/aiscript / handleError

Method handleError

src/interpreter/index.ts:192–204  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

190
191 @autobind
192 private handleError(e: unknown): void {
193 if (!this.opts.err) throw e;
194 if (this.opts.abortOnError) {
195 // when abortOnError is true, error handler should be called only once
196 if (this.stop) return;
197 this.abort();
198 }
199 if (e instanceof AiScriptError) {
200 this.opts.err(e);
201 } else {
202 this.opts.err(new NonAiScriptError(e));
203 }
204 }
205
206 @autobind
207 private log(type: string, params: LogObject): void {

Callers 2

execMethod · 0.95
execFnMethod · 0.95

Calls 1

abortMethod · 0.95

Tested by

no test coverage detected