pub enum DataProfilerError {
Show 30 variants
CsvParsingError {
message: String,
suggestion: String,
},
FileNotFound {
path: String,
},
UnsupportedFormat {
format: String,
},
MemoryLimitExceeded,
InvalidConfiguration {
message: String,
suggestion: String,
},
InvalidSemanticHint {
message: String,
suggestion: String,
},
DataQualityIssue {
issue: String,
impact: String,
recommendation: String,
},
StreamingError {
message: String,
},
SimdUnavailable {
reason: String,
},
SamplingError {
message: String,
suggestion: String,
},
IoError {
message: String,
},
EncodingError {
path: String,
detail: String,
guess: String,
},
JsonParsingError {
message: String,
},
ColumnAnalysisError {
column: String,
reason: String,
suggestion: String,
},
RecoverableError {
message: String,
recovery_suggestion: String,
attempt: usize,
max_attempts: usize,
recovery_attempts: Vec<RecoveryAttempt>,
},
RecoveryFailed {
attempts: usize,
last_strategy: String,
recovery_log: String,
original_error: String,
},
ParquetError {
message: String,
},
ArrowError {
message: String,
},
UnsupportedDataSource {
message: String,
},
AllEnginesFailed {
message: String,
},
MetricsCalculationError {
message: String,
},
DuplicateColumnName {
names: String,
plural: String,
source_label: String,
},
ConfigValidationError {
message: String,
},
DatabaseConnectionError {
message: String,
suggestion: String,
},
DatabaseQueryError {
message: String,
},
DatabaseConfigError {
message: String,
},
DatabaseFeatureDisabled {
message: String,
},
SqlValidationError {
message: String,
},
DatabaseSslError {
message: String,
},
DatabaseRetryExhausted {
operation: String,
attempts: u32,
last_error: String,
},
}Expand description
Enhanced error types with more descriptive messages for DataProfiler
Variants§
CsvParsingError
FileNotFound
UnsupportedFormat
MemoryLimitExceeded
InvalidConfiguration
InvalidSemanticHint
DataQualityIssue
StreamingError
SamplingError
IoError
EncodingError
JsonParsingError
ColumnAnalysisError
RecoverableError
Fields
recovery_attempts: Vec<RecoveryAttempt>RecoveryFailed
ParquetError
ArrowError
UnsupportedDataSource
AllEnginesFailed
MetricsCalculationError
DuplicateColumnName
ConfigValidationError
DatabaseConnectionError
DatabaseQueryError
DatabaseConfigError
DatabaseFeatureDisabled
SqlValidationError
DatabaseSslError
DatabaseRetryExhausted
Implementations§
Source§impl DataProfilerError
impl DataProfilerError
Sourcepub fn database_connection(message: &str) -> DataProfilerError
pub fn database_connection(message: &str) -> DataProfilerError
Create a database connection error.
The message is scrubbed of URL credentials before storage so a driver error that echoes the connection string cannot leak the password.
Sourcepub fn database_query(message: &str) -> DataProfilerError
pub fn database_query(message: &str) -> DataProfilerError
Create a database query error.
Redacts URL credentials that a driver error might surface; the raw SQL text and bound parameter values are never embedded by callers.
Sourcepub fn database_config(message: &str) -> DataProfilerError
pub fn database_config(message: &str) -> DataProfilerError
Create a database config error
Sourcepub fn database_feature_disabled(
db_name: &str,
feature: &str,
) -> DataProfilerError
pub fn database_feature_disabled( db_name: &str, feature: &str, ) -> DataProfilerError
Create a feature-not-enabled error
Sourcepub fn sql_validation(message: &str) -> DataProfilerError
pub fn sql_validation(message: &str) -> DataProfilerError
Create a SQL validation error
Sourcepub fn database_ssl(message: &str) -> DataProfilerError
pub fn database_ssl(message: &str) -> DataProfilerError
Create a database SSL error
Sourcepub fn duplicate_column_name(
duplicates: &[String],
source: &str,
) -> DataProfilerError
pub fn duplicate_column_name( duplicates: &[String], source: &str, ) -> DataProfilerError
Create a duplicate-column-name error from the already-collected list of repeated names and a short transport label.
Only the offending names and the source are embedded — never row values — so the diagnostic cannot leak cell data.
Sourcepub fn csv_parsing(
original_error: &str,
file_path: Option<&str>,
) -> DataProfilerError
pub fn csv_parsing( original_error: &str, file_path: Option<&str>, ) -> DataProfilerError
Create a CSV parsing error with helpful suggestions.
file_path is None at boundaries that do not know the source (e.g. the
From<csv::Error> conversion); pass Some(path) whenever it is known so
the suggestion can name the offending file instead of a placeholder.
Sourcepub fn file_not_found<P>(path: P) -> DataProfilerError
pub fn file_not_found<P>(path: P) -> DataProfilerError
Create a file not found error with path context
Sourcepub fn unsupported_format(extension: &str) -> DataProfilerError
pub fn unsupported_format(extension: &str) -> DataProfilerError
Create unsupported format error with format detection
Sourcepub fn invalid_config(message: &str, suggestion: &str) -> DataProfilerError
pub fn invalid_config(message: &str, suggestion: &str) -> DataProfilerError
Create configuration error with specific suggestion
Sourcepub fn data_quality_issue(
issue: &str,
impact: &str,
recommendation: &str,
) -> DataProfilerError
pub fn data_quality_issue( issue: &str, impact: &str, recommendation: &str, ) -> DataProfilerError
Create data quality issue with impact and recommendation
Sourcepub fn streaming_error(message: &str) -> DataProfilerError
pub fn streaming_error(message: &str) -> DataProfilerError
Create streaming error with context
Create SIMD error with fallback information
Sourcepub fn sampling_error(message: &str, suggestion: &str) -> DataProfilerError
pub fn sampling_error(message: &str, suggestion: &str) -> DataProfilerError
Create sampling error with suggestion
Sourcepub fn io_error(original: &Error) -> DataProfilerError
pub fn io_error(original: &Error) -> DataProfilerError
Create I/O error with context
Sourcepub fn json_parsing_error(original: &str) -> DataProfilerError
pub fn json_parsing_error(original: &str) -> DataProfilerError
Create JSON parsing error
Sourcepub fn column_analysis_error(
column: &str,
reason: &str,
suggestion: &str,
) -> DataProfilerError
pub fn column_analysis_error( column: &str, reason: &str, suggestion: &str, ) -> DataProfilerError
Create column analysis error with specific suggestion
Sourcepub fn recoverable_error(
message: &str,
recovery_suggestion: &str,
attempt: usize,
max_attempts: usize,
) -> DataProfilerError
pub fn recoverable_error( message: &str, recovery_suggestion: &str, attempt: usize, max_attempts: usize, ) -> DataProfilerError
Create a recoverable error that can be auto-retried
Sourcepub fn recovery_failed(
attempts: usize,
last_strategy: &str,
recovery_log: &str,
original_error: &str,
) -> DataProfilerError
pub fn recovery_failed( attempts: usize, last_strategy: &str, recovery_log: &str, original_error: &str, ) -> DataProfilerError
Create a recovery failed error with attempt log
Sourcepub fn add_recovery_attempt(&mut self, attempt: RecoveryAttempt)
pub fn add_recovery_attempt(&mut self, attempt: RecoveryAttempt)
Add a recovery attempt to the error
Sourcepub fn supports_auto_recovery(&self) -> bool
pub fn supports_auto_recovery(&self) -> bool
Check if error supports auto-recovery
Sourcepub fn suggested_recovery_strategies(&self) -> Vec<RecoveryStrategy>
pub fn suggested_recovery_strategies(&self) -> Vec<RecoveryStrategy>
Get suggested recovery strategies for this error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable (can continue processing)
Sourcepub fn suggestion(&self) -> Option<String>
pub fn suggestion(&self) -> Option<String>
The actionable next step for this error, as structured context.
Suggestions live in the variants and the Display string, but callers
that want to react programmatically (or render the hint separately from
the message) should read it here rather than parse the formatted output.
Trait Implementations§
Source§impl Clone for DataProfilerError
impl Clone for DataProfilerError
Source§fn clone(&self) -> DataProfilerError
fn clone(&self) -> DataProfilerError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataProfilerError
impl Debug for DataProfilerError
Source§impl Display for DataProfilerError
impl Display for DataProfilerError
Source§impl Error for DataProfilerError
impl Error for DataProfilerError
1.30.0 · 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 From<ArrowError> for DataProfilerError
Available on crate feature arrow only.Convert from arrow::error::ArrowError to DataProfilerError
impl From<ArrowError> for DataProfilerError
arrow only.Convert from arrow::error::ArrowError to DataProfilerError
Source§fn from(err: ArrowError) -> DataProfilerError
fn from(err: ArrowError) -> DataProfilerError
Source§impl From<Error> for DataProfilerError
Convert from anyhow::Error to DataProfilerError with context.
impl From<Error> for DataProfilerError
Convert from anyhow::Error to DataProfilerError with context.
These conversions run where the source path/operation is not known, so they
never fabricate one: a path is only ever attached by the call sites that hold
it (see DataProfilerError::csv_parsing, map_io_error, and the facade’s
existence check). Preserving the original message keeps the source diagnostic.
Source§fn from(err: Error) -> DataProfilerError
fn from(err: Error) -> DataProfilerError
Source§impl From<Error> for DataProfilerError
Convert from std::io::Error to DataProfilerError.
impl From<Error> for DataProfilerError
Convert from std::io::Error to DataProfilerError.
Path-less by design: callers that know the file use map_io_error to produce
a DataProfilerError::FileNotFound with the real path. Here we keep the OS
message (which already names the condition) rather than guessing a path.
Source§fn from(err: Error) -> DataProfilerError
fn from(err: Error) -> DataProfilerError
Source§impl From<Error> for DataProfilerError
Convert from csv::Error to DataProfilerError with enhanced context.
impl From<Error> for DataProfilerError
Convert from csv::Error to DataProfilerError with enhanced context.
The source path is unknown at this boundary, so the suggestion is written
without a filename rather than the misleading 'unknown' placeholder.
Source§fn from(err: Error) -> DataProfilerError
fn from(err: Error) -> DataProfilerError
Source§impl From<Error> for DataProfilerError
Convert from serde_json::Error to DataProfilerError
impl From<Error> for DataProfilerError
Convert from serde_json::Error to DataProfilerError
Source§fn from(err: Error) -> DataProfilerError
fn from(err: Error) -> DataProfilerError
Source§impl From<Error> for DataProfilerError
Convert from toml::de::Error to DataProfilerError
impl From<Error> for DataProfilerError
Convert from toml::de::Error to DataProfilerError
Source§fn from(err: Error) -> DataProfilerError
fn from(err: Error) -> DataProfilerError
Source§impl From<Error> for DataProfilerError
Convert from toml::ser::Error to DataProfilerError
impl From<Error> for DataProfilerError
Convert from toml::ser::Error to DataProfilerError
Source§fn from(err: Error) -> DataProfilerError
fn from(err: Error) -> DataProfilerError
Source§impl From<PatternError> for DataProfilerError
Convert from glob::PatternError to DataProfilerError
impl From<PatternError> for DataProfilerError
Convert from glob::PatternError to DataProfilerError
Source§fn from(err: PatternError) -> DataProfilerError
fn from(err: PatternError) -> DataProfilerError
Auto Trait Implementations§
impl Freeze for DataProfilerError
impl RefUnwindSafe for DataProfilerError
impl Send for DataProfilerError
impl Sync for DataProfilerError
impl Unpin for DataProfilerError
impl UnsafeUnpin for DataProfilerError
impl UnwindSafe for DataProfilerError
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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