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
use thiserror::Error;

/// Error type.
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum DemesForwardError {
    /// Stores a [`demes::DemesError`].
    #[error(transparent)]
    DemesError(#[from] demes::DemesError),
    /// Errors related to time.
    /// Will be returned if invalid time
    /// values occur after converting
    /// time to generations.
    #[error("{0:?}")]
    TimeError(String),
    /// Errors related to invalid deme sizes
    /// arising during application of size change
    /// functions.
    #[error("{0:?}")]
    InvalidDemeSize(f64),
    /// Errors related to invalid internal states.
    /// In general, this error indicates a bug
    /// that should be reported.
    #[error("{0:?}")]
    InternalError(String),
}