use thiserror::Error;
#[derive(Debug, Error)]
pub enum OpenteleError {
#[error("I/O Error: {0}")]
Io(#[from] std::io::Error),
#[error("TData structure is invalid: {0}")]
InvalidTData(String),
#[error("Crypto error: {0}")]
CryptoError(String),
#[error("Qt stream parsing error: {0}")]
QtParseError(String),
#[error("SQLite database error: {0}")]
SqliteError(#[from] rusqlite::Error),
#[error("Unsupported platform or configuration: {0}")]
Unsupported(String),
#[error("Invalid argument: {0}")]
InvalidArgument(String),
#[error("Input exceeds the supported size limit: {actual} bytes (maximum {maximum})")]
SizeLimit {
actual: u64,
maximum: u64,
},
}
pub type Result<T> = std::result::Result<T, OpenteleError>;