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 = "polars_0_51")]
54 #[error(transparent)]
55 Polars0_51Error(#[from] polars_crate_0_51::error::PolarsError),
56
57 #[cfg(feature = "polars_0_52")]
58 #[error(transparent)]
59 Polars0_52Error(#[from] polars_crate_0_52::error::PolarsError),
60
61 #[cfg(feature = "polars_0_53")]
62 #[error(transparent)]
63 Polars0_53Error(#[from] polars_crate_0_53::error::PolarsError),
64
65 #[cfg(feature = "arrow_54")]
66 #[error(transparent)]
67 Arrow54Error(#[from] arrow_crate_54::error::ArrowError),
68
69 #[cfg(feature = "arrow_55")]
70 #[error(transparent)]
71 Arrow55Error(#[from] arrow_crate_55::error::ArrowError),
72
73 #[cfg(feature = "arrow_56")]
74 #[error(transparent)]
75 Arrow56Error(#[from] arrow_crate_56::error::ArrowError),
76
77 #[cfg(feature = "arrow_57")]
78 #[error(transparent)]
79 Arrow57Error(#[from] arrow_crate_57::error::ArrowError),
80
81 #[cfg(feature = "arrow_58")]
82 #[error(transparent)]
83 Arrow58Error(#[from] arrow_crate_58::error::ArrowError),
84
85 #[error("Chunks must be aligned when moving data from Polars to Arrow.")]
86 ChunksNotAligned,
87}