• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

getdozer / dozer / 4295401807

pending completion
4295401807

push

github

GitHub
Bump version (#1099)

28685 of 39545 relevant lines covered (72.54%)

52105.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/dozer-types/src/errors/types.rs
1
use geo::vincenty_distance::FailedToConvergeError;
2
use thiserror::Error;
3

4
use crate::types::FieldType;
5

6
use super::internal::BoxedError;
×
7

8
#[derive(Error, Debug)]
×
9
pub enum TypeError {
10
    #[error("Invalid field index: {0}")]
11
    InvalidFieldIndex(usize),
12
    #[error("Invalid field name: {0}")]
13
    InvalidFieldName(String),
14
    #[error("Invalid field type")]
15
    InvalidFieldType,
16
    #[error("Invalid field value: {value}, field type: {field_type}, nullable: {nullable}")]
17
    InvalidFieldValue {
18
        field_type: FieldType,
19
        nullable: bool,
20
        value: String,
21
    },
22
    #[error("Invalid timestamp")]
23
    InvalidTimestamp,
24
    #[error("Ambiguous timestamp")]
25
    AmbiguousTimestamp,
26
    #[error("Serialization failed: {0}")]
27
    SerializationError(#[source] SerializationError),
28
    #[error("Failed to parse the field: {0}")]
×
29
    DeserializationError(#[source] DeserializationError),
30
    #[error("Failed to calculate distance: {0}")]
31
    DistanceCalculationError(#[source] FailedToConvergeError),
32
}
33

34
#[derive(Error, Debug)]
×
35
pub enum SerializationError {
36
    #[error("json: {0}")]
37
    Json(#[from] serde_json::Error),
38
    #[error("bincode: {0}")]
×
39
    Bincode(#[from] bincode::Error),
40
    #[error("custom: {0}")]
41
    Custom(#[from] BoxedError),
42
}
43

44
#[derive(Error, Debug)]
×
45
pub enum DeserializationError {
46
    #[error("json: {0}")]
47
    Json(#[from] serde_json::Error),
48
    #[error("bincode: {0}")]
49
    Bincode(#[from] bincode::Error),
50
    #[error("custom: {0}")]
51
    Custom(#[from] BoxedError),
52
    #[error("Empty input")]
53
    EmptyInput,
54
    #[error("Unrecognised field type : {0}")]
55
    UnrecognisedFieldType(u8),
56
    #[error("Bad data length")]
57
    BadDataLength,
58
    #[error("Bad data format: {0}")]
59
    BadDateFormat(#[from] chrono::ParseError),
60
    #[error("utf8: {0}")]
61
    Utf8(#[from] std::str::Utf8Error),
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc