pub enum StatutoryError {
UnknownPtkpTier(String),
UnknownRiskClass(u8),
Yaml(Error),
Io(Error),
UnknownTerCategory(String),
NoTerRates(String),
MissingOvertimeBands,
NoParamsForPeriod(String, String),
Db(Error),
}Expand description
Errors raised by the statutory calculators. Only the config-keyed lookups (PTKP tier, JKK risk class) and the YAML loader are fallible; the math itself is total.
Variants§
UnknownPtkpTier(String)
The PTKP tier is not present in pph21.ptkp_map — the config is incomplete.
UnknownRiskClass(u8)
The BPJS JKK risk class is not present in bpjs.ketenagakerjaan.jkk_rates_by_risk_class.
Yaml(Error)
A statutory config YAML could not be parsed.
Io(Error)
A config file could not be read.
UnknownTerCategory(String)
The TER category is not one of ter_a|ter_b|ter_c (interop failure with the employee axis).
NoTerRates(String)
No TER bands are effective for the category — TER must fail closed, never zero-tax.
MissingOvertimeBands
No overtime multiplier bands are configured — overtime pay must fail closed, never zero-pay.
NoParamsForPeriod(String, String)
A parameter table has no rows effective at the requested date (as-of loader only).
Db(Error)
A parameter-table read failed at the database (as-of loader only). Infrastructure failure —
distinct from NoParamsForPeriod, which is a data-presence failure the caller maps to 422.
Trait Implementations§
Source§impl Debug for StatutoryError
impl Debug for StatutoryError
Source§impl Display for StatutoryError
impl Display for StatutoryError
Source§impl Error for StatutoryError
impl Error for StatutoryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for StatutoryError
impl From<Error> for StatutoryError
Source§impl From<Error> for StatutoryError
impl From<Error> for StatutoryError
Source§impl From<Error> for StatutoryError
impl From<Error> for StatutoryError
Source§impl From<StatutoryError> for PayrollError
impl From<StatutoryError> for PayrollError
Source§fn from(source: StatutoryError) -> Self
fn from(source: StatutoryError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for StatutoryError
impl !UnwindSafe for StatutoryError
impl Freeze for StatutoryError
impl Send for StatutoryError
impl Sync for StatutoryError
impl Unpin for StatutoryError
impl UnsafeUnpin for StatutoryError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more