pub enum Error {
Show 33 variants
Solana(Error),
Market(MarketError),
Unimplemented,
InvalidArgument(&'static str),
EmptyDeposit,
EmptyWithdrawal,
EmptySwap,
InvalidPrices,
Computation(&'static str),
PoolComputation(PoolKind, &'static str),
PowComputation,
Overflow,
DividedByZero,
InvalidPoolValue(&'static str),
Convert,
BuildParams(&'static str),
MissingPoolKind(PoolKind),
MissingClockKind(ClockKind),
MintReceiverNotSet,
WithdrawalVaultNotSet,
InsufficientFundsToPayForCosts(InsolventCloseStep),
InvalidPosition(&'static str),
Liquidatable(LiquidatableReason),
NotLiquidatable,
UnableToGetBorrowingFactorEmptyPoolValue,
InsufficientReserve(String, String),
InsufficientReserveForOpenInterest(String, String),
PnlFactorExceeded(PnlFactorKind, &'static str),
MaxPoolAmountExceeded(&'static str),
MaxPoolValueExceeded(&'static str),
MaxOpenInterestExceeded,
InvalidTokenBalance(&'static str, String, String),
UnableToGetFundingFactorEmptyOpenInterest,
}Expand description
Error type.
Variants§
Solana(Error)
solana only.Anchor error.
Market(MarketError)
gmsol-utils only.Market errors from [gmsol-utils].
Unimplemented
Unimplemented.
InvalidArgument(&'static str)
Invalid Argument.
EmptyDeposit
Empty deposit.
EmptyWithdrawal
Empty withdrawal.
EmptySwap
Empty swap.
InvalidPrices
Invalid prices.
Computation(&'static str)
Unknown computation error.
PoolComputation(PoolKind, &'static str)
Computation error in pool
PowComputation
Power computation error.
Overflow
Overflow.
DividedByZero
Divided by zero.
InvalidPoolValue(&'static str)
Invalid pool value.
Convert
Convert error.
BuildParams(&'static str)
Build params error.
MissingPoolKind(PoolKind)
Missing pool of kind.
MissingClockKind(ClockKind)
Missing clock of kind.
MintReceiverNotSet
Mint receiver not set.
WithdrawalVaultNotSet
Withdrawal vault not set.
InsufficientFundsToPayForCosts(InsolventCloseStep)
Insufficient funds to pay for cost.
InvalidPosition(&'static str)
Invalid position state.
Liquidatable(LiquidatableReason)
Liquidatable Position.
NotLiquidatable
Not liquidatable.
UnableToGetBorrowingFactorEmptyPoolValue
Unable to get borrowing factor for empty pool value.
InsufficientReserve(String, String)
Insufficient reserve.
InsufficientReserveForOpenInterest(String, String)
Insufficient reserve for open interest.
PnlFactorExceeded(PnlFactorKind, &'static str)
Pnl Factor Exceeded.
MaxPoolAmountExceeded(&'static str)
Max pool amount exceeded.
MaxPoolValueExceeded(&'static str)
Max pool value for deposit exceeded.
MaxOpenInterestExceeded
Max open interest exceeded.
InvalidTokenBalance(&'static str, String, String)
Invalid token balance.
UnableToGetFundingFactorEmptyOpenInterest
Unable to get funding factor when the open interest is empty.