Skip to content

Process Error

1 min read

Import: import system.process;

Read the process guide for launch settings, cancellation, and streaming ownership.

ProcessError

Failure launching or communicating with a child process, implementing Error.

public class ProcessError: Error

constructor

Creates an error with a machine code and message.

public constructor(code: string, message: string)

message

Human-readable explanation of the process failure, suitable for logs and error output.

public fun message(): string

code

Stable machine code (ESPAWN, EIO, EUNSUPPORTED, …).

public fun code(): string

spawn_failed

The executable could not be launched (not found, not executable, permission denied, ...).

public static fun spawn_failed(message: string): ProcessError

io

A read/write against a running child's stdin/stdout/stderr failed.

public static fun io(message: string): ProcessError

unsupported

Process control is not available on the current host (e.g. the browser).

public static fun unsupported(message: string): ProcessError

failed

Reports a nonzero exit status from run_checked.

public static fun failed(message: string): ProcessError

cancelled

Cooperative cancellation (CancellationToken).

public static fun cancelled(): ProcessError