pub enum Error {
Show 36 variants
InvalidInput {
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
DatasetAlreadyExists {
uri: String,
location: Location,
backtrace: MaybeBacktrace,
},
SchemaMismatch {
difference: String,
location: Location,
backtrace: MaybeBacktrace,
},
DatasetNotFound {
path: String,
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
CorruptFile {
path: Path,
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
NotSupported {
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
CommitConflict {
version: u64,
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
IncompatibleTransaction {
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
RetryableCommitConflict {
version: u64,
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
TooMuchWriteContention {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
Timeout {
message: String,
location: Location,
},
Internal {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
PrerequisiteFailed {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
Unprocessable {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
Arrow {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
Schema {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
NotFound {
uri: String,
location: Location,
backtrace: MaybeBacktrace,
},
IO {
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
Index {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
IndexNotFound {
identity: String,
location: Location,
backtrace: MaybeBacktrace,
},
InvalidTableLocation {
message: String,
},
Stop,
Wrapped {
error: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
Cloned {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
Execution {
message: String,
location: Location,
backtrace: MaybeBacktrace,
},
InvalidRef {
message: String,
},
RefConflict {
message: String,
},
RefNotFound {
message: String,
},
Cleanup {
message: String,
},
VersionNotFound {
message: String,
},
VersionConflict {
message: String,
major_version: u16,
minor_version: u16,
location: Location,
backtrace: MaybeBacktrace,
},
Namespace {
source: Box<dyn Error + Send + Sync + 'static>,
location: Location,
backtrace: MaybeBacktrace,
},
External {
source: Box<dyn Error + Send + Sync + 'static>,
},
FieldNotFound {
source: FieldNotFoundError,
},
DiskCapExceeded {
cap_bytes: u64,
used_bytes: u64,
location: Location,
},
Fenced {
reason: FenceReason,
message: String,
location: Location,
},
}Variants§
InvalidInput
DatasetAlreadyExists
SchemaMismatch
DatasetNotFound
Fields
backtrace: MaybeBacktraceCorruptFile
Fields
backtrace: MaybeBacktraceNotSupported
CommitConflict
Fields
backtrace: MaybeBacktraceIncompatibleTransaction
RetryableCommitConflict
Fields
backtrace: MaybeBacktraceTooMuchWriteContention
Timeout
Internal
PrerequisiteFailed
Unprocessable
Arrow
Schema
NotFound
IO
Index
IndexNotFound
InvalidTableLocation
Stop
Stream early stop
Wrapped
Cloned
Execution
InvalidRef
RefConflict
RefNotFound
Cleanup
VersionNotFound
VersionConflict
Fields
backtrace: MaybeBacktraceNamespace
External
External error passed through from user code.
This variant preserves errors that users pass into Lance APIs (e.g., via streams
with custom error types). The original error can be recovered using Error::into_external
or inspected using Error::external_source.
FieldNotFound
A requested field was not found in a schema.
Fields
source: FieldNotFoundErrorDiskCapExceeded
Fenced
A writer has been fenced and must stop (see FenceReason). The message
keeps the Writer fenced prefix for legacy string consumers; new code
should match on Error::fence_reason.
Implementations§
Source§impl Error
impl Error
Sourcepub fn backtrace(&self) -> Option<&Backtrace>
pub fn backtrace(&self) -> Option<&Backtrace>
Returns the captured Rust backtrace, if available.
Always returns None when the backtrace feature is not enabled.
pub fn corrupt_file(path: Path, message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
pub fn invalid_input_source( source: Box<dyn Error + Send + Sync + 'static>, ) -> Self
pub fn io(message: impl Into<String>) -> Self
Sourcepub fn fenced_by_peer(message: impl Into<String>) -> Self
pub fn fenced_by_peer(message: impl Into<String>) -> Self
A successor writer claimed a higher epoch; this writer lost ownership.
Sourcepub fn writer_poisoned(message: impl Into<String>) -> Self
pub fn writer_poisoned(message: impl Into<String>) -> Self
Our WAL persistence failed; in-memory state may have diverged from the durable WAL, so the writer must be reopened to replay.
Sourcepub fn fence_reason(&self) -> Option<FenceReason>
pub fn fence_reason(&self) -> Option<FenceReason>
The FenceReason if this is Error::Fenced, else None. Prefer this
over matching the error message to decide how to react to a fence.
pub fn io_source(source: Box<dyn Error + Send + Sync + 'static>) -> Self
pub fn dataset_already_exists(uri: impl Into<String>) -> Self
pub fn dataset_not_found( path: impl Into<String>, source: Box<dyn Error + Send + Sync + 'static>, ) -> Self
pub fn version_conflict( message: impl Into<String>, major_version: u16, minor_version: u16, ) -> Self
pub fn not_found(uri: impl Into<String>) -> Self
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Return whether this error or one of its typed sources is a missing object.
pub fn wrapped(error: Box<dyn Error + Send + Sync + 'static>) -> Self
pub fn schema(message: impl Into<String>) -> Self
pub fn not_supported(message: impl Into<String>) -> Self
pub fn not_supported_source( source: Box<dyn Error + Send + Sync + 'static>, ) -> Self
pub fn internal(message: impl Into<String>) -> Self
pub fn timeout(message: impl Into<String>) -> Self
pub fn namespace(message: impl Into<String>) -> Self
pub fn namespace_source(source: Box<dyn Error + Send + Sync + 'static>) -> Self
pub fn arrow(message: impl Into<String>) -> Self
pub fn execution(message: impl Into<String>) -> Self
pub fn cloned(message: impl Into<String>) -> Self
pub fn schema_mismatch(difference: impl Into<String>) -> Self
pub fn unprocessable(message: impl Into<String>) -> Self
pub fn too_much_write_contention(message: impl Into<String>) -> Self
pub fn prerequisite_failed(message: impl Into<String>) -> Self
pub fn index(message: impl Into<String>) -> Self
pub fn index_not_found(identity: impl Into<String>) -> Self
pub fn commit_conflict_source( version: u64, source: Box<dyn Error + Send + Sync + 'static>, ) -> Self
pub fn retryable_commit_conflict_source( version: u64, source: Box<dyn Error + Send + Sync + 'static>, ) -> Self
pub fn incompatible_transaction_source( source: Box<dyn Error + Send + Sync + 'static>, ) -> Self
pub fn disk_cap_exceeded(cap_bytes: u64, used_bytes: u64) -> Self
Sourcepub fn external(source: Box<dyn Error + Send + Sync + 'static>) -> Self
pub fn external(source: Box<dyn Error + Send + Sync + 'static>) -> Self
Create an External error from a boxed error source.
Sourcepub fn field_not_found(
field_name: impl Into<String>,
candidates: Vec<String>,
) -> Self
pub fn field_not_found( field_name: impl Into<String>, candidates: Vec<String>, ) -> Self
Create a FieldNotFound error with the given field name and available candidates.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read more