CliSubprocessCore.Command.Error exception (CliSubprocessCore v0.1.0)

Copy Markdown View Source

Structured failures for the provider-aware non-PTY command lane.

Summary

Functions

Wraps provider profile command construction failures.

Wraps invalid command-lane options.

Wraps provider lookup failure for provider-aware execution.

Wraps a transport-layer execution failure.

Types

reason()

@type reason() ::
  {:invalid_options, term()}
  | {:provider_not_found, atom()}
  | {:command_plan_failed, term()}
  | {:transport, ExternalRuntimeTransport.Transport.Error.t()}

t()

@type t() :: %CliSubprocessCore.Command.Error{
  __exception__: true,
  context: map(),
  message: binary(),
  reason: reason()
}

Functions

command_plan_failed(reason, context \\ %{})

Wraps provider profile command construction failures.

invalid_options(reason, context \\ %{})

Wraps invalid command-lane options.

provider_not_found(provider)

Wraps provider lookup failure for provider-aware execution.

transport_error(error, context \\ %{})

@spec transport_error(ExternalRuntimeTransport.Transport.Error.t(), map()) :: t()

Wraps a transport-layer execution failure.