MCPcopy Create free account
hub / github.com/solana-program/system / fmt

Method fmt

interface/src/error.rs:88–118  ·  view source on GitHub ↗
(&self, f: &mut core::fmt::Formatter)

Source from the content-addressed store, hash-verified

86
87impl core::fmt::Display for SystemError {
88 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
89 match self {
90 SystemError::AccountAlreadyInUse => {
91 f.write_str("an account with the same address already exists")
92 }
93 SystemError::ResultWithNegativeLamports => {
94 f.write_str("account does not have enough SOL to perform the operation")
95 }
96 SystemError::InvalidProgramId => {
97 f.write_str("cannot assign account to this program id")
98 }
99 SystemError::InvalidAccountDataLength => {
100 f.write_str("cannot allocate account data of this length")
101 }
102 SystemError::MaxSeedLengthExceeded => {
103 f.write_str("length of requested seed is too long")
104 }
105 SystemError::AddressWithSeedMismatch => {
106 f.write_str("provided address does not match addressed derived from seed")
107 }
108 SystemError::NonceNoRecentBlockhashes => {
109 f.write_str("advancing stored nonce requires a populated RecentBlockhashes sysvar")
110 }
111 SystemError::NonceBlockhashNotExpired => {
112 f.write_str("stored nonce is still in recent_blockhashes")
113 }
114 SystemError::NonceUnexpectedBlockhashValue => {
115 f.write_str("specified nonce does not match stored nonce")
116 }
117 }
118 }
119}
120
121impl<T> DecodeError<T> for SystemError {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected