Skip to content

Commit d5144f6

Browse files
author
Anirudh Suresh
committed
add error messages for LiquidityOracleError
1 parent 5f06773 commit d5144f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pyth-sdk/src/error.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use solana_program::program_error::ProgramError;
2+
use thiserror::Error;
3+
4+
#[derive(Error, Debug, Copy, Clone)]
5+
pub enum LiquidityOracleError {
6+
#[error("deposits exceeds max depositable")]
7+
ExceedsMaxDeposits,
8+
#[error("initial discount rate should not be greater than final discount rate")]
9+
InitialDiscountExceedsFinalDiscount,
10+
#[error("final discount rate should not be greater than the discount precision")]
11+
FinalDiscountExceedsPrecision,
12+
}

0 commit comments

Comments
 (0)