Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
change error type
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Nov 27, 2021
1 parent f9d8089 commit 0ed8464
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub enum ArrowError {
Overflow,
/// Whenever incoming data from the C data interface, IPC or Flight does not fulfil the Arrow specification.
OutOfSpec(String),
/// Various error sources.
Other(String),
}

impl ArrowError {
Expand Down Expand Up @@ -73,9 +71,6 @@ impl Display for ArrowError {
ArrowError::OutOfSpec(message) => {
write!(f, "{}", message)
}
ArrowError::Other(message) => {
write!(f, "{}", message)
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/io/avro/read/decompress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ fn decompress_block(
Ok(false)
}
#[cfg(not(feature = "io_avro_compression"))]
Some(Compression::Deflate) => Err(ArrowError::Other(
Some(Compression::Deflate) => Err(ArrowError::InvalidArgumentError(
"The avro file is deflate-encoded but feature 'io_avro_compression' is not active."
.to_string(),
)),
#[cfg(not(feature = "io_avro_compression"))]
Some(Compression::Snappy) => Err(ArrowError::Other(
Some(Compression::Snappy) => Err(ArrowError::InvalidArgumentError(
"The avro file is snappy-encoded but feature 'io_avro_compression' is not active."
.to_string(),
)),
Expand Down

0 comments on commit 0ed8464

Please sign in to comment.