(error: unknown): error is ReportedError import {is_reported_error} from '@fuzdev/gro/task_error.js'; Whether error is a ReportedError or a subclass of one, from any copy of Gro.
error
unknownreturns
boolean The errors a task throws to fail with a known failure, apart from the task runner (task.ts).
Making or matching one reaches nothing, so this module grants nothing: library code that fails a task, or classifies a failure, imports it without linking the task runner.
5 declarations
(error: unknown): error is ReportedError import {is_reported_error} from '@fuzdev/gro/task_error.js'; Whether error is a ReportedError or a subclass of one, from any copy of Gro.
errorunknownboolean (error: unknown): error is TaskError import {is_task_error} from '@fuzdev/gro/task_error.js'; Whether error is a TaskError or a subclass of one, from any copy of Gro.
errorunknownboolean import {ReportedError} from '@fuzdev/gro/task_error.js'; A failure its thrower has already reported, so Gro reports it no further and exits non-zero.
Throw one after logging the failure; invoke_task throws one, with the failure as its cause,
when the task it invoked fails.
Errorimport {TaskError} from '@fuzdev/gro/task_error.js'; This is used by tasks to signal a known failure. It's useful for cleaning up logging because we usually don't need their stack trace.
Errorexit_codeThe code the CLI exits with when this error fails the task it invoked,
an integer 1–255; absent or any other value means 1.
type number | undefined
constructortype new (message?: string | undefined, options?: TaskErrorOptions | undefined): TaskError
message?stringoptions?TaskErrorOptions import type {TaskErrorOptions} from '@fuzdev/gro/task_error.js'; Options for a TaskError.
ErrorOptionsexit_code?The code the CLI exits with when this error fails the task it invoked,
like gro run's script's own, an integer 1–255; absent or any other value means 1.
type number