df_interchange/
error.rs

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 = "polars_0_47")]
38    #[error(transparent)]
39    Polars0_47Error(#[from] polars_crate_0_47::error::PolarsError),
40
41    #[cfg(feature = "polars_0_48")]
42    #[error(transparent)]
43    Polars0_48Error(#[from] polars_crate_0_48::error::PolarsError),
44
45    #[cfg(feature = "polars_0_49")]
46    #[error(transparent)]
47    Polars0_49Error(#[from] polars_crate_0_49::error::PolarsError),
48
49    #[cfg(feature = "polars_0_50")]
50    #[error(transparent)]
51    Polars0_50Error(#[from] polars_crate_0_50::error::PolarsError),
52
53    #[cfg(feature = "arrow_54")]
54    #[error(transparent)]
55    Arrow54Error(#[from] arrow_crate_54::error::ArrowError),
56
57    #[cfg(feature = "arrow_55")]
58    #[error(transparent)]
59    Arrow55Error(#[from] arrow_crate_55::error::ArrowError),
60
61    #[cfg(feature = "arrow_56")]
62    #[error(transparent)]
63    Arrow56Error(#[from] arrow_crate_56::error::ArrowError),
64
65    #[error("Chunks must be aligned when moving data from Polars to Arrow.")]
66    ChunksNotAligned,
67}