cala_ledger/balance/
error.rs1use thiserror::Error;
2
3use cala_types::primitives::*;
4
5#[derive(Error, Debug)]
6pub enum BalanceError {
7 #[error("BalanceError - Sqlx: {0}")]
8 Sqlx(#[from] sqlx::Error),
9 #[error("BalanceError - NotFound: there is no balance recorded for journal {0}, account {1}, currency {2}")]
10 NotFound(JournalId, AccountId, Currency),
11 #[error("LedgerError - JournalError: {0}")]
12 JournalError(#[from] crate::journal::error::JournalError),
13 #[error("BalanceError - JournalLocked: - Cannot update balances. The journal {0} is locked")]
14 JournalLocked(JournalId),
15}