//! Errors produced by the `sgp4` module.
usethiserror::Error;/// Errors that can occur while initialising or evaluating SGP4.
#[derive(Debug, Error)]pubenumError{/// `sgp4init` returned a non-zero error code while constructing the
/// internal `SatRec`. The numeric code matches the legacy Vallado
/// convention (1 = eccentricity, 2 = mean motion, 3 = perturbed
/// eccentricity, 4 = semi-latus rectum, 6 = orbit decay).
#[error("SGP4 init error code {0}")]
SatRecInit(i32),/// Wraps an error surfaced by an [`SGP4Source`](super::SGP4Source)
/// implementation while building [`SGP4InitArgs`](super::SGP4InitArgs)
/// — for example an `OMM` with an unsupported mean-element theory or
/// a malformed epoch.
#[error(transparent)]
Source(Box<dyn std::error::Error +Send+Sync>),}implError{/// Wrap an arbitrary `std::error::Error` value as an
/// [`Error::Source`] without an explicit `Box::new` at the call
/// site.
pubfnsource<E>(e: E)->Selfwhere
E:std::error::Error + Send + Sync + 'static,
{Self::Source(Box::new(e))}}/// Convenient type alias used throughout the `sgp4` module.
pubtypeResult<T>=std::result::Result<T, Error>;