Skip to content

Commit

Permalink
adjust error type
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkaka committed Jul 25, 2023
1 parent 2238522 commit 66d9be8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions polars/polars-lazy/polars-plan/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,8 @@ impl LogicalPlanBuilder {
try_parse_dates: bool,
) -> PolarsResult<Self> {
let path = path.into();
let mut file = std::fs::File::open(&path).map_err(|e| {
polars_err!(
Io: "error open file: '{:?}', {:?}",
path, e
)
})?;
let mut file = std::fs::File::open(&path)
.map_err(|e| polars_err!(ComputeError: "error open file: '{:?}', {:?}", path, e))?;
let mut magic_nr = [0u8; 2];
file.read_exact(&mut magic_nr)
.map_err(|_| polars_err!(NoData: "empty csv"))?;
Expand Down

0 comments on commit 66d9be8

Please sign in to comment.