pub enum TermError {
Show 20 variants
ValidationFailed {
message: String,
check: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
ConstraintEvaluation {
constraint: String,
message: String,
},
DataFusion(DataFusionError),
Arrow(ArrowError),
DataSource {
source_type: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Io(Error),
Parse(String),
Configuration(String),
Serialization(String),
OpenTelemetry(String),
ColumnNotFound {
column: String,
},
TypeMismatch {
expected: String,
found: String,
},
NotSupported(String),
Internal(String),
SecurityError(String),
Repository {
repository_type: String,
operation: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
InvalidRepositoryKey {
key: String,
message: String,
},
InvalidRepositoryQuery {
message: String,
query_info: String,
},
RepositoryKeyCollision {
key: String,
message: String,
},
RepositoryValidation {
field: String,
message: String,
invalid_value: String,
},
}Expand description
The main error type for the Term library.
This enum represents all possible errors that can occur during data validation operations.
Variants§
ValidationFailed
Error that occurs when a validation check fails.
Fields
ConstraintEvaluation
Error that occurs when a constraint evaluation fails.
DataFusion(DataFusionError)
Error from DataFusion operations.
Arrow(ArrowError)
Error from Arrow operations.
DataSource
Error from data source operations.
Fields
Io(Error)
Error from I/O operations.
Parse(String)
Error when parsing or processing data.
Configuration(String)
Error related to configuration.
Serialization(String)
Error from serialization/deserialization operations.
OpenTelemetry(String)
Error from OpenTelemetry operations.
ColumnNotFound
Error when a required column is not found in the dataset.
TypeMismatch
Error when data types don’t match expected types.
NotSupported(String)
Error when an operation is not supported.
Internal(String)
Generic internal error for unexpected conditions.
SecurityError(String)
Security-related error.
Repository
Error from repository operations.
Fields
InvalidRepositoryKey
Error when a repository key is invalid or malformed.
Fields
InvalidRepositoryQuery
Error when repository query parameters are invalid.
Fields
RepositoryKeyCollision
Error when a repository key collision is detected.
RepositoryValidation
Error when repository validation fails.
Implementations§
Source§impl TermError
impl TermError
Sourcepub fn validation_failed(
check: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn validation_failed( check: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a new validation failed error with the given message and check name.
Sourcepub fn validation_failed_with_source(
check: impl Into<String>,
message: impl Into<String>,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn validation_failed_with_source( check: impl Into<String>, message: impl Into<String>, source: Box<dyn Error + Send + Sync>, ) -> Self
Creates a new validation failed error with a source error.
Sourcepub fn data_source(
source_type: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn data_source( source_type: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a new data source error.
Sourcepub fn data_source_with_source(
source_type: impl Into<String>,
message: impl Into<String>,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn data_source_with_source( source_type: impl Into<String>, message: impl Into<String>, source: Box<dyn Error + Send + Sync>, ) -> Self
Creates a new data source error with a source error.
Sourcepub fn repository(
repository_type: impl Into<String>,
operation: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn repository( repository_type: impl Into<String>, operation: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a new repository error.
Sourcepub fn repository_with_source(
repository_type: impl Into<String>,
operation: impl Into<String>,
message: impl Into<String>,
source: Box<dyn Error + Send + Sync>,
) -> Self
pub fn repository_with_source( repository_type: impl Into<String>, operation: impl Into<String>, message: impl Into<String>, source: Box<dyn Error + Send + Sync>, ) -> Self
Creates a new repository error with a source error.
Sourcepub fn invalid_repository_key(
key: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn invalid_repository_key( key: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a new invalid repository key error.
Sourcepub fn invalid_repository_query(
message: impl Into<String>,
query_info: impl Into<String>,
) -> Self
pub fn invalid_repository_query( message: impl Into<String>, query_info: impl Into<String>, ) -> Self
Creates a new invalid repository query error.
Sourcepub fn repository_key_collision(
key: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn repository_key_collision( key: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a new repository key collision error.
Trait Implementations§
Source§impl Error for TermError
impl Error for TermError
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
Source§impl From<AnalyzerError> for TermError
Conversion from AnalyzerError to TermError.
impl From<AnalyzerError> for TermError
Conversion from AnalyzerError to TermError.
Source§fn from(err: AnalyzerError) -> Self
fn from(err: AnalyzerError) -> Self
Source§impl From<ArrowError> for TermError
impl From<ArrowError> for TermError
Source§fn from(source: ArrowError) -> Self
fn from(source: ArrowError) -> Self
Source§impl From<DataFusionError> for TermError
impl From<DataFusionError> for TermError
Source§fn from(source: DataFusionError) -> Self
fn from(source: DataFusionError) -> Self
Auto Trait Implementations§
impl Freeze for TermError
impl !RefUnwindSafe for TermError
impl Send for TermError
impl Sync for TermError
impl Unpin for TermError
impl !UnwindSafe for TermError
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
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> 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>
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>
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