Interface ExecaSyncError<StdoutErrorType>

interface ExecaSyncError<StdoutErrorType> {
    cause?: unknown;
    command: string;
    exitCode: number;
    failed: boolean;
    killed: boolean;
    message: string;
    name: string;
    originalMessage?: string;
    shortMessage: string;
    signal?: string;
    signalDescription?: string;
    stack?: string;
    stderr: StdoutErrorType;
    stdout: StdoutErrorType;
    timedOut: boolean;
}

Type Parameters

  • StdoutErrorType = string

Hierarchy (view full)

Properties

cause?: unknown
command: string

The file and arguments that were run.

exitCode: number

The numeric exit code of the process that was run.

failed: boolean

Whether the process failed to run.

killed: boolean

Whether the process was killed.

message: string

Error message when the child process failed to run. In addition to the underlying error message, it also contains some information related to why the child process errored.

The child process stderr then stdout are appended to the end, separated with newlines and not interleaved.

name: string
originalMessage?: string

Original error message. This is the same as the message property except it includes neither the child process stdout/stderr nor some additional information added by Execa.

This is undefined unless the child process exited due to an error event or a timeout.

shortMessage: string

This is the same as the message property except it does not include the child process stdout/stderr.

signal?: string

The name of the signal that was used to terminate the process. For example, SIGFPE.

If a signal terminated the process, this property is defined and included in the error message. Otherwise it is undefined.

signalDescription?: string

A human-friendly description of the signal that was used to terminate the process. For example, Floating point arithmetic error.

If a signal terminated the process, this property is defined and included in the error message. Otherwise it is undefined. It is also undefined when the signal is very uncommon which should seldomly happen.

stack?: string

The output of the process on stderr.

The output of the process on stdout.

timedOut: boolean

Whether the process timed out.