pub struct AppError {
pub message: String,
pub code: ExitCode,
pub custom_json: Option<String>,
}Fields§
§message: String§code: ExitCode§custom_json: Option<String>Pre-serialized JSON to emit instead of the default ErrorOutput.
Used by the JS execution path to preserve its richer error schema.
Implementations§
Source§impl AppError
impl AppError
pub fn not_implemented(command: &str) -> Self
pub fn stale_session() -> Self
pub fn no_session() -> Self
pub fn target_not_found(tab: &str) -> Self
pub fn no_page_targets() -> Self
pub fn last_tab() -> Self
pub fn element_not_found(selector: &str) -> Self
pub fn evaluation_failed(description: &str) -> Self
pub fn snapshot_failed(description: &str) -> Self
pub fn file_write_failed(path: &str, error: &str) -> Self
pub fn screenshot_failed(description: &str) -> Self
pub fn uid_not_found(uid: &str) -> Self
pub fn invalid_clip(input: &str) -> Self
pub fn no_active_trace() -> Self
pub fn unknown_insight(name: &str) -> Self
pub fn trace_file_not_found(path: &str) -> Self
pub fn trace_parse_failed(error: &str) -> Self
pub fn trace_timeout(timeout_ms: u64) -> Self
pub fn js_execution_failed(description: &str) -> Self
pub fn js_execution_failed_with_json(description: &str, json: String) -> Self
pub fn script_file_not_found(path: &str) -> Self
pub fn script_file_read_failed(path: &str, error: &str) -> Self
pub fn no_js_code() -> Self
pub fn no_dialog_open() -> Self
pub fn dialog_handle_failed(reason: &str) -> Self
pub fn no_chrome_found() -> Self
pub fn no_snapshot_state() -> Self
pub fn element_zero_size(target: &str) -> Self
pub fn invalid_key(key: &str) -> Self
pub fn duplicate_modifier(modifier: &str) -> Self
pub fn interaction_failed(action: &str, reason: &str) -> Self
pub fn emulation_failed(description: &str) -> Self
pub fn invalid_viewport(input: &str) -> Self
pub fn invalid_geolocation(input: &str) -> Self
pub fn file_not_found(path: &str) -> Self
pub fn file_not_readable(path: &str) -> Self
pub fn not_file_input(target: &str) -> Self
pub fn stale_uid(uid: &str) -> Self
pub fn to_json(&self) -> String
pub fn print_json_stderr(&self)
Trait Implementations§
Source§impl Error for AppError
impl Error for AppError
1.30.0 · 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<ChromeError> for AppError
impl From<ChromeError> for AppError
Source§fn from(e: ChromeError) -> Self
fn from(e: ChromeError) -> Self
Converts to this type from the input type.
Source§impl From<ConfigError> for AppError
impl From<ConfigError> for AppError
Source§fn from(e: ConfigError) -> Self
fn from(e: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<SessionError> for AppError
impl From<SessionError> for AppError
Source§fn from(e: SessionError) -> Self
fn from(e: SessionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AppError
impl RefUnwindSafe for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
impl UnwindSafe for AppError
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