Skip to content

Commit

Permalink
update err
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Nov 8, 2024
1 parent 7f34cf6 commit 8869a03
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/polars-core/src/chunked_array/temporal/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ impl DurationChunked {
});
Ok(out)
},
_ => Err(PolarsError::InvalidOperation(
format!("format {:?} not supported for Duration type (expected one of 'iso' or 'polars')", format).into(),
)),
_ => {
polars_bail!(
InvalidOperation: "format {:?} not supported for Duration type (expected one of 'iso' or 'polars')",
format
)
},
}
}

Expand Down

0 comments on commit 8869a03

Please sign in to comment.