pub enum CliError {
Show 20 variants
ActorNotFound {
actor_id: String,
},
ActorStartFailed {
actor_id: String,
reason: String,
},
ActorNotRunning {
actor_id: String,
},
ActorError {
actor_id: String,
reason: String,
},
InvalidProjectDirectory {
path: String,
},
BuildFailed {
output: String,
},
MissingTool {
tool: String,
install_command: String,
},
InvalidManifest {
reason: String,
},
ConfigError {
reason: String,
},
TemplateNotFound {
template: String,
available: String,
},
TemplateError {
reason: String,
},
FileOperationFailed {
operation: String,
path: String,
source: Error,
},
PermissionDenied {
operation: String,
path: String,
},
InvalidInput {
field: String,
value: String,
suggestion: String,
},
ValidationError {
reason: String,
},
ServerError {
message: String,
},
OperationCancelled,
Internal(Error),
Serialization(Error),
Io(Error),
}Expand description
Main error type for the Theater CLI
Variants§
ActorNotFound
Actor-related errors
ActorStartFailed
ActorNotRunning
ActorError
InvalidProjectDirectory
Project and build errors
BuildFailed
MissingTool
InvalidManifest
Manifest and configuration errors
ConfigError
TemplateNotFound
Template errors
TemplateError
FileOperationFailed
I/O and filesystem errors
PermissionDenied
InvalidInput
Validation errors
ValidationError
ServerError
Server/runtime errors
OperationCancelled
Cancellation errors
Internal(Error)
Generic wrapper for other errors
Serialization(Error)
Io(Error)
Implementations§
Source§impl CliError
impl CliError
Sourcepub fn actor_not_found(actor_id: impl Into<String>) -> Self
pub fn actor_not_found(actor_id: impl Into<String>) -> Self
Create an actor not found error
Sourcepub fn build_failed(output: impl Into<String>) -> Self
pub fn build_failed(output: impl Into<String>) -> Self
Create a build failed error
Sourcepub fn invalid_manifest(reason: impl Into<String>) -> Self
pub fn invalid_manifest(reason: impl Into<String>) -> Self
Create an invalid manifest error
Sourcepub fn template_not_found(
template: impl Into<String>,
available: Vec<String>,
) -> Self
pub fn template_not_found( template: impl Into<String>, available: Vec<String>, ) -> Self
Create a template not found error
Sourcepub fn file_operation_failed(
operation: impl Into<String>,
path: impl Into<String>,
source: Error,
) -> Self
pub fn file_operation_failed( operation: impl Into<String>, path: impl Into<String>, source: Error, ) -> Self
Create a file operation failed error
Sourcepub fn invalid_input(
field: impl Into<String>,
value: impl Into<String>,
suggestion: impl Into<String>,
) -> Self
pub fn invalid_input( field: impl Into<String>, value: impl Into<String>, suggestion: impl Into<String>, ) -> Self
Create an invalid input error with helpful suggestions
Sourcepub fn server_error(message: impl Into<String>) -> Self
pub fn server_error(message: impl Into<String>) -> Self
Create a server/runtime error
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Get a user-friendly error message with potential solutions
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error suggests the user should retry
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()
Auto Trait Implementations§
impl Freeze for CliError
impl !RefUnwindSafe for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnsafeUnpin 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
Source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
Converts
self into an anyhow::Error.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