#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("the socket name is invalid")]
InvalidName,
#[cfg(target_os = "macos")]
#[error("the mach port name is invalid")]
InvalidPortName,
#[cfg(target_os = "macos")]
#[error("the mach port name is invalid")]
PortError(#[from] crash_context::ipc::Error),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("client process requesting crash dump has an unknown or invalid pid")]
UnknownClientPid,
#[cfg(any(target_os = "linux", target_os = "android"))]
#[error(transparent)]
Writer(Box<minidump_writer::errors::WriterError>),
#[cfg(target_os = "windows")]
#[error(transparent)]
Writer(#[from] minidump_writer::errors::Error),
#[cfg(target_os = "macos")]
#[error(transparent)]
Writer(#[from] minidump_writer::errors::WriterError),
#[cfg(any(target_os = "windows", target_os = "macos"))]
#[error(transparent)]
Scroll(#[from] scroll::Error),
#[error("protocol error occurred: {0}")]
ProtocolError(&'static str),
}
#[cfg(any(target_os = "linux", target_os = "android"))]
impl From<minidump_writer::errors::WriterError> for Error {
fn from(we: minidump_writer::errors::WriterError) -> Self {
Self::Writer(Box::new(we))
}
}