Cleaned up errors a bit.

This commit is contained in:
2026-09-26 21:26:46 +02:00
parent 75ee0cb760
commit 67153c79bb
8 changed files with 59 additions and 63 deletions
+5 -9
View File
@@ -4,23 +4,19 @@ mod recurring_transaction;
mod schedule;
mod transaction;
pub use cents::{Cents, CentsConversionError};
pub use cents::{Cents, CentsError};
pub use direction::Direction;
pub use recurring_transaction::RecurringTransaction;
pub use schedule::{
Recurrence, RecurrenceInterval, RecurrenceIntervalError, RecurrenceUnit, Schedule,
WeekendAdjustment,
Recurrence, RecurrenceInterval, RecurrenceUnit, Schedule, ScheduleError, WeekendAdjustment,
};
pub use transaction::Transaction;
#[derive(Debug, thiserror::Error)]
pub enum ValidationError {
pub enum DomainError {
#[error(transparent)]
Amount(#[from] CentsConversionError),
Amount(#[from] CentsError),
#[error(transparent)]
RecurrenceInterval(#[from] RecurrenceIntervalError),
#[error("end must not be before start")]
EndBeforeStart,
Schedule(#[from] ScheduleError),
}