Skip to main content

DataProfilerError

Enum DataProfilerError 

Source
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

Fields

§message: String
§suggestion: String
§

FileNotFound

Fields

§path: String
§

UnsupportedFormat

Fields

§format: String
§

MemoryLimitExceeded

§

InvalidConfiguration

Fields

§message: String
§suggestion: String
§

InvalidSemanticHint

Fields

§message: String
§suggestion: String
§

DataQualityIssue

Fields

§issue: String
§impact: String
§recommendation: String
§

StreamingError

Fields

§message: String
§

SimdUnavailable

Fields

§reason: String
§

SamplingError

Fields

§message: String
§suggestion: String
§

IoError

Fields

§message: String
§

EncodingError

Fields

§path: String
§detail: String
§guess: String
§

JsonParsingError

Fields

§message: String
§

ColumnAnalysisError

Fields

§column: String
§reason: String
§suggestion: String
§

RecoverableError

Fields

§message: String
§recovery_suggestion: String
§attempt: usize
§max_attempts: usize
§recovery_attempts: Vec<RecoveryAttempt>
§

RecoveryFailed

Fields

§attempts: usize
§last_strategy: String
§recovery_log: String
§original_error: String
§

ParquetError

Fields

§message: String
§

ArrowError

Fields

§message: String
§

UnsupportedDataSource

Fields

§message: String
§

AllEnginesFailed

Fields

§message: String
§

MetricsCalculationError

Fields

§message: String
§

DuplicateColumnName

Fields

§names: String
§plural: String
§source_label: String
§

ConfigValidationError

Fields

§message: String
§

DatabaseConnectionError

Fields

§message: String
§suggestion: String
§

DatabaseQueryError

Fields

§message: String
§

DatabaseConfigError

Fields

§message: String
§

DatabaseFeatureDisabled

Fields

§message: String
§

SqlValidationError

Fields

§message: String
§

DatabaseSslError

Fields

§message: String
§

DatabaseRetryExhausted

Fields

§operation: String
§attempts: u32
§last_error: String

Implementations§

Source§

impl DataProfilerError

Source

pub fn database_connection(message: &str) -> Self

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.

Source

pub fn database_query(message: &str) -> Self

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.

Source

pub fn database_config(message: &str) -> Self

Create a database config error

Source

pub fn database_feature_disabled(db_name: &str, feature: &str) -> Self

Create a feature-not-enabled error

Source

pub fn sql_validation(message: &str) -> Self

Create a SQL validation error

Source

pub fn database_ssl(message: &str) -> Self

Create a database SSL error

Source

pub fn duplicate_column_name(duplicates: &[String], source: &str) -> Self

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.

Source

pub fn csv_parsing(original_error: &str, file_path: Option<&str>) -> Self

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.

Source

pub fn file_not_found<P: AsRef<str>>(path: P) -> Self

Create a file not found error with path context

Source

pub fn unsupported_format(extension: &str) -> Self

Create unsupported format error with format detection

Source

pub fn invalid_config(message: &str, suggestion: &str) -> Self

Create configuration error with specific suggestion

Source

pub fn data_quality_issue( issue: &str, impact: &str, recommendation: &str, ) -> Self

Create data quality issue with impact and recommendation

Source

pub fn streaming_error(message: &str) -> Self

Create streaming error with context

Source

pub fn simd_unavailable(reason: &str) -> Self

Create SIMD error with fallback information

Source

pub fn sampling_error(message: &str, suggestion: &str) -> Self

Create sampling error with suggestion

Source

pub fn io_error(original: &Error) -> Self

Create I/O error with context

Source

pub fn json_parsing_error(original: &str) -> Self

Create JSON parsing error

Source

pub fn column_analysis_error( column: &str, reason: &str, suggestion: &str, ) -> Self

Create column analysis error with specific suggestion

Source

pub fn recoverable_error( message: &str, recovery_suggestion: &str, attempt: usize, max_attempts: usize, ) -> Self

Create a recoverable error that can be auto-retried

Source

pub fn recovery_failed( attempts: usize, last_strategy: &str, recovery_log: &str, original_error: &str, ) -> Self

Create a recovery failed error with attempt log

Source

pub fn add_recovery_attempt(&mut self, attempt: RecoveryAttempt)

Add a recovery attempt to the error

Source

pub fn supports_auto_recovery(&self) -> bool

Check if error supports auto-recovery

Source

pub fn suggested_recovery_strategies(&self) -> Vec<RecoveryStrategy>

Get suggested recovery strategies for this error

Source

pub fn is_recoverable(&self) -> bool

Check if this error is recoverable (can continue processing)

Source

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.

Source

pub fn category(&self) -> &'static str

Get error category for logging/metrics

Trait Implementations§

Source§

impl Clone for DataProfilerError

Source§

fn clone(&self) -> DataProfilerError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataProfilerError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DataProfilerError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for DataProfilerError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

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) -> Self

Converts to this type from the input type.
Source§

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) -> Self

Converts to this type from the input type.
Source§

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) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DataProfilerError

Convert from serde_json::Error to DataProfilerError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DataProfilerError

Convert from toml::de::Error to DataProfilerError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DataProfilerError

Convert from toml::ser::Error to DataProfilerError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<PatternError> for DataProfilerError

Convert from glob::PatternError to DataProfilerError

Source§

fn from(err: PatternError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V