1#![allow(clippy::enum_variant_names)]
2
3use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, InterchangeError>;
6
7#[derive(Error, Debug)]
8pub enum InterchangeError {
9 #[cfg(feature = "polars_0_40")]
10 #[error(transparent)]
11 Polars0_40Error(#[from] polars_crate_0_40::error::PolarsError),
12
13 #[cfg(feature = "polars_0_41")]
14 #[error(transparent)]
15 Polars0_41Error(#[from] polars_crate_0_41::error::PolarsError),
16
17 #[cfg(feature = "polars_0_42")]
18 #[error(transparent)]
19 Polars0_42Error(#[from] polars_crate_0_42::error::PolarsError),
20
21 #[cfg(feature = "polars_0_43")]
22 #[error(transparent)]
23 Polars0_43Error(#[from] polars_crate_0_43::error::PolarsError),
24
25 #[cfg(feature = "polars_0_44")]
26 #[error(transparent)]
27 Polars0_44Error(#[from] polars_crate_0_44::error::PolarsError),
28
29 #[cfg(feature = "polars_0_45")]
30 #[error(transparent)]
31 Polars0_45Error(#[from] polars_crate_0_45::error::PolarsError),
32
33 #[cfg(feature = "polars_0_46")]
34 #[error(transparent)]
35 Polars0_46Error(#[from] polars_crate_0_46::error::PolarsError),
36
37 #[cfg(feature = "arrow_54")]
38 #[error(transparent)]
39 Arrow54Error(#[from] arrow_crate_54::error::ArrowError),
40
41 #[cfg(feature = "arrow_55")]
42 #[error(transparent)]
43 Arrow55Error(#[from] arrow_crate_55::error::ArrowError),
44
45 #[error("Chunks must be aligned when moving data from Polars to Arrow.")]
46 ChunksNotAligned,
47}