Class AmountOutOfRangeException
An issued-currency amount the node sent is outside the range decimal can hold.
Namespace: Xrpl.Client.Exceptions
Assembly: Xrpl.dll
Syntax
public class AmountOutOfRangeException : RippleException
Remarks
XRPL issued currency runs from 1e-81 to roughly 1e96 - rippled's
STAmount allows a 16-digit mantissa with an exponent in [-96, 80] - while
decimal stops at about 7.9e28. The two do not fit inside one another,
and no parsing of the string can change that.
This used to be answered by clamping to decimal.MaxValue, which is a number that is wrong by up to 67 orders of magnitude and does not say so - and by a bare System.FormatException for negative amounts, which named the string rather than the problem. Both are gone; the amount that does not fit is reported as such.
Value carries what the node actually sent, so a caller who needs the real figure still has it. Representing it rather than reporting it is issue #150.
Constructors
| Edit this page View SourceAmountOutOfRangeException(string)
An issued-currency amount the node sent is outside the range decimal can hold.
Declaration
public AmountOutOfRangeException(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value |
Remarks
XRPL issued currency runs from 1e-81 to roughly 1e96 - rippled's
STAmount allows a 16-digit mantissa with an exponent in [-96, 80] - while
decimal stops at about 7.9e28. The two do not fit inside one another,
and no parsing of the string can change that.
This used to be answered by clamping to decimal.MaxValue, which is a number that is wrong by up to 67 orders of magnitude and does not say so - and by a bare System.FormatException for negative amounts, which named the string rather than the problem. Both are gone; the amount that does not fit is reported as such.
Value carries what the node actually sent, so a caller who needs the real figure still has it. Representing it rather than reporting it is issue #150.
Properties
| Edit this page View SourceValue
The amount as the node sent it, in the ledger's own string form.
Declaration
public string Value { get; }
Property Value
| Type | Description |
|---|---|
| string |