1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Error types for itihas.
use alloc::string::String;
use thiserror::Error;
/// Errors that can occur in historical data processing.
#[derive(Debug, Clone, PartialEq, Eq, Error)]
#[non_exhaustive]
pub enum ItihasError {
/// Era not found by name.
#[error("unknown era: {0}")]
UnknownEra(String),
/// Civilization not found by name.
#[error("unknown civilization: {0}")]
UnknownCivilization(String),
/// Calendar system not found by name.
#[error("unknown calendar: {0}")]
UnknownCalendar(String),
/// Year value is out of supported range.
#[error("invalid year: {0}")]
InvalidYear(i32),
/// Event not found by name.
#[error("event not found: {0}")]
EventNotFound(String),
/// Figure not found by name.
#[error("figure not found: {0}")]
FigureNotFound(String),
/// Archaeological site not found by name.
#[error("site not found: {0}")]
SiteNotFound(String),
/// Trade route not found by name.
#[error("route not found: {0}")]
RouteNotFound(String),
/// Military campaign not found by name.
#[error("campaign not found: {0}")]
CampaignNotFound(String),
}