Exceptions¶
- exception hordak.exceptions.HordakError¶
Abstract exception type for all Hordak errors
- exception hordak.exceptions.AccountingError¶
Abstract exception type for errors specifically related to accounting
- exception hordak.exceptions.AccountTypeOnChildNode¶
Raised when trying to set a type on a child account
The type of a child account is always inferred from its root account
- exception hordak.exceptions.ZeroAmountError¶
Raised when a zero amount is found on a transaction leg
Transaction leg amounts must be none zero.
- exception hordak.exceptions.AccountingEquationViolationError¶
Raised if - upon checking - the accounting equation is found to be violated.
The accounting equation is:
0 = Liabilities + Equity + Income - Expenses - Assets
- exception hordak.exceptions.LossyCalculationError¶
Raised to prevent a lossy or imprecise calculation from occurring.
Typically this may happen when trying to multiply/divide a monetary value by a float.
- exception hordak.exceptions.BalanceComparisonError¶
Raised when comparing a balance to an invalid value
A balance must be compared against another balance or a Money instance
- exception hordak.exceptions.TradingAccountRequiredError¶
Raised when trying to perform a currency exchange via an account other than a ‘trading’ account
- exception hordak.exceptions.InvalidFeeCurrency¶
Raised when fee currency does not match source currency
- exception hordak.exceptions.CannotSimplifyError¶
Used internally by Currency class
- exception hordak.exceptions.NoMoreAccountCodesAvailableInSequence¶
Raised when all account codes in a sequence have been generated
For example, we cannot generate an account code after “999”. Or, when using alpha characters, after “ZZZ”.
- exception hordak.exceptions.InvalidOrMissingAccountTypeError¶
When an unexpected account type is encountered
- exception hordak.exceptions.NeitherCreditNorDebitPresentError¶
When neither credit nor debit present for a Leg
- exception hordak.exceptions.BothCreditAndDebitPresentError¶
When both credit and debit present for a Leg
- exception hordak.exceptions.CreditOrDebitIsNegativeError¶
When either the credit and debit field of a Leg is negative