pub enum CliError {
Formatted(Formatted),
Backtraced(Backtraced),
}
Expand description
CliError enum that represents all the errors for the leo-lang
crate.
Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
Source§impl CliError
impl CliError
Sourcepub fn cli_io_error(error: impl ErrorArg) -> Self
pub fn cli_io_error(error: impl ErrorArg) -> Self
For when the CLI experiences an IO error.
Sourcepub fn cli_invalid_input(error: impl Display) -> Self
pub fn cli_invalid_input(error: impl Display) -> Self
For when the CLI is given invalid user input.
Sourcepub fn cli_runtime_error(error: impl Display) -> Self
pub fn cli_runtime_error(error: impl Display) -> Self
For when the CLI fails to run something
Sourcepub fn could_not_fetch_versions(error: impl ErrorArg) -> Self
pub fn could_not_fetch_versions(error: impl ErrorArg) -> Self
For when the CLI could not fetch the versions.
Sourcepub fn failed_to_enable_ansi_support() -> Self
pub fn failed_to_enable_ansi_support() -> Self
For when the CLI fails to enable ansi support.
Sourcepub fn self_update_error(error: impl ErrorArg) -> Self
pub fn self_update_error(error: impl ErrorArg) -> Self
For when the CLI fails to self update.
Sourcepub fn self_update_build_error(error: impl ErrorArg) -> Self
pub fn self_update_build_error(error: impl ErrorArg) -> Self
For when the CLI fails to self update.
Sourcepub fn old_release_version(current: impl Display, latest: impl Display) -> Self
pub fn old_release_version(current: impl Display, latest: impl Display) -> Self
For when the CLI has an old release version.
pub fn failed_to_load_instructions(error: impl Display) -> Self
pub fn needs_leo_build() -> Self
pub fn failed_to_execute_build(error: impl Display) -> Self
pub fn failed_to_execute_new(error: impl Display) -> Self
pub fn failed_to_execute_run(error: impl Display) -> Self
pub fn failed_to_execute_node(error: impl Display) -> Self
pub fn failed_to_execute_deploy(error: impl Display) -> Self
pub fn failed_to_parse_new(error: impl Display) -> Self
pub fn failed_to_parse_run(error: impl Display) -> Self
pub fn failed_to_parse_node(error: impl Display) -> Self
pub fn failed_to_parse_deploy(error: impl Display) -> Self
pub fn failed_to_parse_execute(error: impl Display) -> Self
pub fn failed_to_execute_execute(error: impl Display) -> Self
pub fn failed_to_parse_seed(error: impl Display) -> Self
pub fn failed_to_write_file(error: impl Display) -> Self
pub fn failed_to_parse_private_key(error: impl Display) -> Self
pub fn failed_to_execute_account(error: impl Display) -> Self
pub fn failed_to_read_environment_private_key(error: impl Display) -> Self
pub fn recursive_deploy_with_record() -> Self
pub fn invalid_network_name(network: impl Display) -> Self
pub fn invalid_example(example: impl Display) -> Self
pub fn build_error(error: impl Display) -> Self
pub fn failed_to_parse_record(error: impl Display) -> Self
pub fn string_parse_error(error: impl Display) -> Self
pub fn broadcast_error(error: impl Display) -> Self
pub fn failed_to_get_endpoint_from_env() -> Self
pub fn failed_to_get_private_key_from_env() -> Self
pub fn failed_to_get_network_from_env() -> Self
pub fn constraint_limit_exceeded( program: impl Display, limit: u64, network: impl Display, ) -> Self
pub fn variable_limit_exceeded( program: impl Display, limit: u64, network: impl Display, ) -> Self
pub fn confirmation_failed() -> Self
pub fn invalid_balance(account: impl Display) -> Self
pub fn table_render_failed(error: impl Display) -> Self
pub fn num_exit_codes() -> i32
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Backtraced> for CliError
impl From<Backtraced> for CliError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl LeoMessageCode for CliError
impl LeoMessageCode for CliError
Implements the trait for LeoError Codes.
Source§fn error_code(&self) -> String
fn error_code(&self) -> String
Returns the prefixed error identifier.
Source§fn warning_code(&self) -> String
fn warning_code(&self) -> String
Returns the prefixed warning identifier.
Source§fn message_type() -> String
fn message_type() -> String
Returns the message’s code type for the program.
Source§fn code_identifier() -> i8
fn code_identifier() -> i8
The LeoErrorCode which has a default code identifier of 037
(Leo upsidedown and backwards). This is to make the exit codes
unique to Leo itself.
Auto Trait Implementations§
impl Freeze for CliError
impl RefUnwindSafe for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnwindSafe for CliError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more