pub enum CliError {
Show 18 variants
Clap(Error),
Usage(String),
StartIcp(Error),
Icp {
status: String,
message: String,
},
Encode {
method: &'static str,
source: Error,
},
Decode {
method: &'static str,
source: Error,
},
RawReply(&'static str),
ArgumentFile(Error),
Canister {
method: &'static str,
error: String,
},
ProviderCard {
provider: &'static str,
set_id: String,
offset: u64,
source: Box<Self>,
},
ProviderReplay {
provider: String,
kind: &'static str,
set: String,
first_record: usize,
last_record: usize,
source: Box<Self>,
},
Json(Error),
Io(Error),
CacheIo {
action: &'static str,
path: PathBuf,
source: Error,
},
BackupIo {
action: &'static str,
path: PathBuf,
source: Error,
},
InvalidCache(String),
PaginationStalled(String),
PaginationLimit(usize),
}Expand description
Failure reported by CLI parsing, the ICP process boundary, or the typed canister protocol.
Variants§
Clap(Error)
Clap rejected the command line before any canister call was attempted.
Usage(String)
Command-line arguments did not describe a valid operation.
StartIcp(Error)
The ICP CLI process could not be started.
Icp
The ICP CLI process reported a failed call.
Fields
Encode
Typed Candid argument encoding failed before the process was started.
Decode
The canister reply was not valid for the shared interface type.
Fields
RawReply(&'static str)
The ICP CLI returned something other than one bounded hexadecimal reply.
ArgumentFile(Error)
A temporary binary Candid argument file could not be prepared.
Canister
A typed application error was returned by the canister.
Fields
ProviderCard
A provider-set card acquisition failed after earlier cards were checkpointed successfully.
Fields
ProviderReplay
Replaying a bounded group of retained provider records failed.
Fields
Json(Error)
JSON input or output could not be decoded or encoded.
Io(Error)
Writing the final report failed.
CacheIo
Reading or atomically replacing a provider cache failed.
Fields
BackupIo
Writing a canonical JSON backup failed.
Fields
InvalidCache(String)
A provider cache did not satisfy its bounded format contract.
PaginationStalled(String)
A canister returned a continuation that had already been observed.
PaginationLimit(usize)
Automatic pagination reached its operator-provided safety bound.
Implementations§
Trait Implementations§
Source§impl Error for CliError
impl Error for CliError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()