Skip to content

ArgumentError

1 min read

Import: import system;

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.

ArgumentError

Invalid CLI / environment usage implementing Error.

public class ArgumentError: Error

constructor

Builds an error with a stable code string and human-readable message.

public constructor(code: string, message: string)

message

Human-readable explanation of the invalid command-line argument, suitable for logs and error output.

public fun message(): string

code

Stable machine-readable code (e.g. EINVAL).

public fun code(): string

invalid

Convenience constructor for invalid-argument failures.

public static fun invalid(message: string): ArgumentError