Skip to content

CliError

1 min read

Import: import system.cli;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

CliError

Invalid invocation, command definition, or typed lookup; help and version are successful outcomes.

public class CliError: Error

constructor

Creates an error with a stable machine code and diagnostic text.

public constructor(code: string, message: string)

code

EINVAL for definitions, EARGS for invocations, ENOENT for missing values, or ETYPE for incorrect getters.

public fun code(): string

message

Human-readable diagnostic; invocation failures include usage guidance.

public fun message(): string