errors
Defines the hierarchy of errors for money-related operations.
This object provides a central location for all error types that can be returned by the library, including those related to arithmetic, formatting, currency validation, and currency conversion.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
errors.type
Members list
Type members
Classlikes
Returned when an arithmetic operation on monetary values fails.
Returned when an arithmetic operation on monetary values fails.
This can occur, for example, during a division by zero.
Value parameters
- cause
-
The optional underlying
Throwable(e.g., java.lang.ArithmeticException). - message
-
An explanation of the arithmetic error.
Attributes
- Companion
- object
- Supertypes
-
trait Producttrait Equalstrait MoneyErrortrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ArithmeticError.type
Container for specific ConversionError types.
Container for specific ConversionError types.
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ConversionError.type
A base type for all errors related to currency conversion.
A base type for all errors related to currency conversion.
Attributes
- Companion
- object
- Supertypes
-
trait MoneyErrortrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ProviderErrorclass RateNotFound
Container for specific CurrencyError types.
Container for specific CurrencyError types.
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
CurrencyError.type
A base type for errors related to currency validation and lookup.
A base type for errors related to currency validation and lookup.
Attributes
- Companion
- object
- Supertypes
-
trait MoneyErrortrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CurrencyNotFoundclass InvalidCcyCodeFormatclass InvalidNumericCodeRangeclass NumericCodeNotFound
Returned when an unexpected internal error occurs within the money module.
Returned when an unexpected internal error occurs within the money module.
This error typically signifies a logic flaw or an inconsistent state that should not be encountered during normal programme execution.
Value parameters
- cause
-
An optional underlying
Throwablethat caused this error. - message
-
A description of the internal error.
Attributes
- Companion
- object
- Supertypes
-
trait Producttrait Equalstrait MoneyErrortrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
InternalError.type
A root error for all operations in the world.money module.
A root error for all operations in the world.money module.
It extends scala.util.control.NoStackTrace to improve performance by avoiding stack trace generation for errors used in control flow.
Attributes
- Supertypes
-
trait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ArithmeticErrortrait ConversionErrorclass ProviderErrorclass RateNotFoundtrait CurrencyErrorclass CurrencyNotFoundclass InvalidCcyCodeFormatclass InvalidNumericCodeRangeclass NumericCodeNotFoundclass InternalErrorclass NumberFormattingErrorShow all
Returned when a String cannot be parsed into a numeric representation.
Returned when a String cannot be parsed into a numeric representation.
This error is returned by factories like world.money.currency.CurrencyValue$.fromString.
Value parameters
- cause
-
An optional underlying
Throwable, typically aNumberFormatException. - message
-
A description of the formatting or parsing error.
Attributes
- Companion
- object
- Supertypes
-
trait Producttrait Equalstrait MoneyErrortrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type