1use thiserror::Error;
5
6#[derive(Debug, Error, PartialEq)]
7pub enum ExportError {
8 #[error(
9 "text value in {object}.{column} contains both single and double quotes and cannot be represented as an RQL literal"
10 )]
11 UnrepresentableText {
12 object: String,
13 column: String,
14 },
15
16 #[error("non-finite float value in {object}.{column} cannot be represented as an RQL literal")]
17 NonFiniteFloat {
18 object: String,
19 column: String,
20 },
21
22 #[error("value of type {value_type} in {object}.{column} cannot be exported")]
23 UnsupportedValue {
24 object: String,
25 column: String,
26 value_type: String,
27 },
28
29 #[error("column type {value_type} in {object} cannot be exported")]
30 UnsupportedType {
31 object: String,
32 value_type: String,
33 },
34
35 #[error("unresolved {kind} reference with id {id} while rendering {object}")]
36 UnresolvedReference {
37 kind: &'static str,
38 id: u64,
39 object: String,
40 },
41}
42
43#[derive(Debug, PartialEq)]
44pub enum RenderError {
45 UnrepresentableText,
46 NonFiniteFloat,
47 Unsupported(&'static str),
48}