rippled
Loading...
Searching...
No Matches
TER.cpp
1#include <xrpl/protocol/TER.h>
2
3#include <boost/range/adaptor/transformed.hpp>
4#include <boost/range/iterator_range_core.hpp>
5
6#include <optional>
7#include <string>
8#include <unordered_map>
9#include <utility>
10
11namespace ripple {
12
17{
18 // clang-format off
19
20 // Macros are generally ugly, but they can help make code readable to
21 // humans without affecting the compiler.
22#define MAKE_ERROR(code, desc) { code, { #code, desc } }
23
24 static
28 {
29 MAKE_ERROR(tecAMM_BALANCE, "AMM has invalid balance."),
30 MAKE_ERROR(tecAMM_INVALID_TOKENS, "AMM invalid LP tokens."),
31 MAKE_ERROR(tecAMM_FAILED, "AMM transaction failed."),
32 MAKE_ERROR(tecAMM_EMPTY, "AMM is in empty state."),
33 MAKE_ERROR(tecAMM_NOT_EMPTY, "AMM is not in empty state."),
34 MAKE_ERROR(tecAMM_ACCOUNT, "This operation is not allowed on an AMM Account."),
35 MAKE_ERROR(tecCLAIM, "Fee claimed. Sequence used. No action."),
36 MAKE_ERROR(tecDIR_FULL, "Can not add entry to full directory."),
37 MAKE_ERROR(tecFAILED_PROCESSING, "Failed to correctly process transaction."),
38 MAKE_ERROR(tecINSUF_RESERVE_LINE, "Insufficient reserve to add trust line."),
39 MAKE_ERROR(tecINSUF_RESERVE_OFFER, "Insufficient reserve to create offer."),
40 MAKE_ERROR(tecNO_DST, "Destination does not exist. Send XRP to create it."),
41 MAKE_ERROR(tecNO_DST_INSUF_XRP, "Destination does not exist. Too little XRP sent to create it."),
42 MAKE_ERROR(tecNO_LINE_INSUF_RESERVE, "No such line. Too little reserve to create it."),
43 MAKE_ERROR(tecNO_LINE_REDUNDANT, "Can't set non-existent line to default."),
44 MAKE_ERROR(tecPATH_DRY, "Path could not send partial amount."),
45 MAKE_ERROR(tecPATH_PARTIAL, "Path could not send full amount."),
46 MAKE_ERROR(tecNO_ALTERNATIVE_KEY, "The operation would remove the ability to sign transactions with the account."),
47 MAKE_ERROR(tecNO_REGULAR_KEY, "Regular key is not set."),
48 MAKE_ERROR(tecOVERSIZE, "Object exceeded serialization limits."),
49 MAKE_ERROR(tecUNFUNDED, "Not enough XRP to satisfy the reserve requirement."),
50 MAKE_ERROR(tecUNFUNDED_ADD, "DEPRECATED."),
51 MAKE_ERROR(tecUNFUNDED_AMM, "Insufficient balance to fund AMM."),
52 MAKE_ERROR(tecUNFUNDED_OFFER, "Insufficient balance to fund created offer."),
53 MAKE_ERROR(tecUNFUNDED_PAYMENT, "Insufficient XRP balance to send."),
54 MAKE_ERROR(tecOWNERS, "Non-zero owner count."),
55 MAKE_ERROR(tecNO_ISSUER, "Issuer account does not exist."),
56 MAKE_ERROR(tecNO_AUTH, "Not authorized to hold asset."),
57 MAKE_ERROR(tecNO_LINE, "No such line."),
58 MAKE_ERROR(tecINSUFF_FEE, "Insufficient balance to pay fee."),
59 MAKE_ERROR(tecFROZEN, "Asset is frozen."),
60 MAKE_ERROR(tecNO_TARGET, "Target account does not exist."),
61 MAKE_ERROR(tecNO_PERMISSION, "No permission to perform requested operation."),
62 MAKE_ERROR(tecNO_ENTRY, "No matching entry found."),
63 MAKE_ERROR(tecINSUFFICIENT_RESERVE, "Insufficient reserve to complete requested operation."),
64 MAKE_ERROR(tecNEED_MASTER_KEY, "The operation requires the use of the Master Key."),
65 MAKE_ERROR(tecDST_TAG_NEEDED, "A destination tag is required."),
66 MAKE_ERROR(tecINTERNAL, "An internal error has occurred during processing."),
67 MAKE_ERROR(tecCRYPTOCONDITION_ERROR, "Malformed, invalid, or mismatched conditional or fulfillment."),
68 MAKE_ERROR(tecINVARIANT_FAILED, "One or more invariants for the transaction were not satisfied."),
69 MAKE_ERROR(tecEXPIRED, "Expiration time is passed."),
70 MAKE_ERROR(tecDUPLICATE, "Ledger object already exists."),
71 MAKE_ERROR(tecKILLED, "No funds transferred and no offer created."),
72 MAKE_ERROR(tecHAS_OBLIGATIONS, "The account cannot be deleted since it has obligations."),
73 MAKE_ERROR(tecTOO_SOON, "It is too early to attempt the requested operation. Please wait."),
74 MAKE_ERROR(tecMAX_SEQUENCE_REACHED, "The maximum sequence number was reached."),
75 MAKE_ERROR(tecNO_SUITABLE_NFTOKEN_PAGE, "A suitable NFToken page could not be located."),
76 MAKE_ERROR(tecNFTOKEN_BUY_SELL_MISMATCH, "The 'Buy' and 'Sell' NFToken offers are mismatched."),
77 MAKE_ERROR(tecNFTOKEN_OFFER_TYPE_MISMATCH, "The type of NFToken offer is incorrect."),
78 MAKE_ERROR(tecCANT_ACCEPT_OWN_NFTOKEN_OFFER, "An NFToken offer cannot be claimed by its owner."),
79 MAKE_ERROR(tecINSUFFICIENT_FUNDS, "Not enough funds available to complete requested transaction."),
80 MAKE_ERROR(tecOBJECT_NOT_FOUND, "A requested object could not be located."),
81 MAKE_ERROR(tecINSUFFICIENT_PAYMENT, "The payment is not sufficient."),
82 MAKE_ERROR(tecINCOMPLETE, "Some work was completed, but more submissions required to finish."),
83 MAKE_ERROR(tecXCHAIN_BAD_TRANSFER_ISSUE, "Bad xchain transfer issue."),
84 MAKE_ERROR(tecXCHAIN_NO_CLAIM_ID, "No such xchain claim id."),
85 MAKE_ERROR(tecXCHAIN_BAD_CLAIM_ID, "Bad xchain claim id."),
86 MAKE_ERROR(tecXCHAIN_CLAIM_NO_QUORUM, "Quorum was not reached on the xchain claim."),
87 MAKE_ERROR(tecXCHAIN_PROOF_UNKNOWN_KEY, "Unknown key for the xchain proof."),
88 MAKE_ERROR(tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE, "Only XRP may be used for xchain create account."),
89 MAKE_ERROR(tecXCHAIN_WRONG_CHAIN, "XChain Transaction was submitted to the wrong chain."),
90 MAKE_ERROR(tecXCHAIN_REWARD_MISMATCH, "The reward amount must match the reward specified in the xchain bridge."),
91 MAKE_ERROR(tecXCHAIN_NO_SIGNERS_LIST, "The account did not have a signers list."),
92 MAKE_ERROR(tecXCHAIN_SENDING_ACCOUNT_MISMATCH,"The sending account did not match the expected sending account."),
93 MAKE_ERROR(tecXCHAIN_INSUFF_CREATE_AMOUNT, "Insufficient amount to create an account."),
94 MAKE_ERROR(tecXCHAIN_ACCOUNT_CREATE_PAST, "The account create count has already passed."),
95 MAKE_ERROR(tecXCHAIN_ACCOUNT_CREATE_TOO_MANY, "There are too many pending account create transactions to submit a new one."),
96 MAKE_ERROR(tecXCHAIN_PAYMENT_FAILED, "Failed to transfer funds in a xchain transaction."),
97 MAKE_ERROR(tecXCHAIN_SELF_COMMIT, "Account cannot commit funds to itself."),
98 MAKE_ERROR(tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR, "Bad public key account pair in an xchain transaction."),
99 MAKE_ERROR(tecXCHAIN_CREATE_ACCOUNT_DISABLED, "This bridge does not support account creation."),
100 MAKE_ERROR(tecEMPTY_DID, "The DID object did not have a URI or DIDDocument field."),
101 MAKE_ERROR(tecINVALID_UPDATE_TIME, "The Oracle object has invalid LastUpdateTime field."),
102 MAKE_ERROR(tecTOKEN_PAIR_NOT_FOUND, "Token pair is not found in Oracle object."),
103 MAKE_ERROR(tecARRAY_EMPTY, "Array is empty."),
104 MAKE_ERROR(tecARRAY_TOO_LARGE, "Array is too large."),
105 MAKE_ERROR(tecLOCKED, "Fund is locked."),
106 MAKE_ERROR(tecBAD_CREDENTIALS, "Bad credentials."),
107 MAKE_ERROR(tecWRONG_ASSET, "Wrong asset given."),
108 MAKE_ERROR(tecLIMIT_EXCEEDED, "Limit exceeded."),
109 MAKE_ERROR(tecPSEUDO_ACCOUNT, "This operation is not allowed against a pseudo-account."),
110 MAKE_ERROR(tecPRECISION_LOSS, "The amounts used by the transaction cannot interact."),
111
112 MAKE_ERROR(tefALREADY, "The exact transaction was already in this ledger."),
113 MAKE_ERROR(tefBAD_ADD_AUTH, "Not authorized to add account."),
114 MAKE_ERROR(tefBAD_AUTH, "Transaction's public key is not authorized."),
115 MAKE_ERROR(tefBAD_LEDGER, "Ledger in unexpected state."),
116 MAKE_ERROR(tefBAD_QUORUM, "Signatures provided do not meet the quorum."),
117 MAKE_ERROR(tefBAD_SIGNATURE, "A signature is provided for a non-signer."),
118 MAKE_ERROR(tefCREATED, "Can't add an already created account."),
119 MAKE_ERROR(tefEXCEPTION, "Unexpected program state."),
120 MAKE_ERROR(tefFAILURE, "Failed to apply."),
121 MAKE_ERROR(tefINTERNAL, "Internal error."),
122 MAKE_ERROR(tefMASTER_DISABLED, "Master key is disabled."),
123 MAKE_ERROR(tefMAX_LEDGER, "Ledger sequence too high."),
124 MAKE_ERROR(tefNO_AUTH_REQUIRED, "Auth is not required."),
125 MAKE_ERROR(tefNOT_MULTI_SIGNING, "Account has no appropriate list of multi-signers."),
126 MAKE_ERROR(tefPAST_SEQ, "This sequence number has already passed."),
127 MAKE_ERROR(tefWRONG_PRIOR, "This previous transaction does not match."),
128 MAKE_ERROR(tefBAD_AUTH_MASTER, "Auth for unclaimed account needs correct master key."),
129 MAKE_ERROR(tefINVARIANT_FAILED, "Fee claim violated invariants for the transaction."),
130 MAKE_ERROR(tefTOO_BIG, "Transaction affects too many items."),
131 MAKE_ERROR(tefNO_TICKET, "Ticket is not in ledger."),
132 MAKE_ERROR(tefNFTOKEN_IS_NOT_TRANSFERABLE, "The specified NFToken is not transferable."),
133 MAKE_ERROR(tefINVALID_LEDGER_FIX_TYPE, "The LedgerFixType field has an invalid value."),
134
135 MAKE_ERROR(telLOCAL_ERROR, "Local failure."),
136 MAKE_ERROR(telBAD_DOMAIN, "Domain too long."),
137 MAKE_ERROR(telBAD_PATH_COUNT, "Malformed: Too many paths."),
138 MAKE_ERROR(telBAD_PUBLIC_KEY, "Public key is not valid."),
139 MAKE_ERROR(telFAILED_PROCESSING, "Failed to correctly process transaction."),
140 MAKE_ERROR(telINSUF_FEE_P, "Fee insufficient."),
141 MAKE_ERROR(telNO_DST_PARTIAL, "Partial payment to create account not allowed."),
142 MAKE_ERROR(telCAN_NOT_QUEUE, "Can not queue at this time."),
143 MAKE_ERROR(telCAN_NOT_QUEUE_BALANCE, "Can not queue at this time: insufficient balance to pay all queued fees."),
144 MAKE_ERROR(telCAN_NOT_QUEUE_BLOCKS, "Can not queue at this time: would block later queued transaction(s)."),
145 MAKE_ERROR(telCAN_NOT_QUEUE_BLOCKED, "Can not queue at this time: blocking transaction in queue."),
146 MAKE_ERROR(telCAN_NOT_QUEUE_FEE, "Can not queue at this time: fee insufficient to replace queued transaction."),
147 MAKE_ERROR(telCAN_NOT_QUEUE_FULL, "Can not queue at this time: queue is full."),
148 MAKE_ERROR(telWRONG_NETWORK, "Transaction specifies a Network ID that differs from that of the local node."),
149 MAKE_ERROR(telREQUIRES_NETWORK_ID, "Transactions submitted to this node/network must include a correct NetworkID field."),
150 MAKE_ERROR(telNETWORK_ID_MAKES_TX_NON_CANONICAL, "Transactions submitted to this node/network must NOT include a NetworkID field."),
151 MAKE_ERROR(telENV_RPC_FAILED, "Unit test RPC failure."),
152
153 MAKE_ERROR(temMALFORMED, "Malformed transaction."),
154 MAKE_ERROR(temBAD_AMM_TOKENS, "Malformed: Invalid LPTokens."),
155 MAKE_ERROR(temBAD_AMOUNT, "Malformed: Bad amount."),
156 MAKE_ERROR(temBAD_CURRENCY, "Malformed: Bad currency."),
157 MAKE_ERROR(temBAD_EXPIRATION, "Malformed: Bad expiration."),
158 MAKE_ERROR(temBAD_FEE, "Invalid fee, negative or not XRP."),
159 MAKE_ERROR(temBAD_ISSUER, "Malformed: Bad issuer."),
160 MAKE_ERROR(temBAD_LIMIT, "Limits must be non-negative."),
161 MAKE_ERROR(temBAD_OFFER, "Malformed: Bad offer."),
162 MAKE_ERROR(temBAD_PATH, "Malformed: Bad path."),
163 MAKE_ERROR(temBAD_PATH_LOOP, "Malformed: Loop in path."),
164 MAKE_ERROR(temBAD_QUORUM, "Malformed: Quorum is unreachable."),
165 MAKE_ERROR(temBAD_REGKEY, "Malformed: Regular key cannot be same as master key."),
166 MAKE_ERROR(temBAD_SEND_XRP_LIMIT, "Malformed: Limit quality is not allowed for XRP to XRP."),
167 MAKE_ERROR(temBAD_SEND_XRP_MAX, "Malformed: Send max is not allowed for XRP to XRP."),
168 MAKE_ERROR(temBAD_SEND_XRP_NO_DIRECT, "Malformed: No Ripple direct is not allowed for XRP to XRP."),
169 MAKE_ERROR(temBAD_SEND_XRP_PARTIAL, "Malformed: Partial payment is not allowed for XRP to XRP."),
170 MAKE_ERROR(temBAD_SEND_XRP_PATHS, "Malformed: Paths are not allowed for XRP to XRP."),
171 MAKE_ERROR(temBAD_SEQUENCE, "Malformed: Sequence is not in the past."),
172 MAKE_ERROR(temBAD_SIGNATURE, "Malformed: Bad signature."),
173 MAKE_ERROR(temBAD_SIGNER, "Malformed: No signer may duplicate account or other signers."),
174 MAKE_ERROR(temBAD_SRC_ACCOUNT, "Malformed: Bad source account."),
175 MAKE_ERROR(temBAD_TRANSFER_RATE, "Malformed: Transfer rate must be >= 1.0 and <= 2.0"),
176 MAKE_ERROR(temBAD_WEIGHT, "Malformed: Weight must be a positive value."),
177 MAKE_ERROR(temDST_IS_SRC, "Destination may not be source."),
178 MAKE_ERROR(temDST_NEEDED, "Destination not specified."),
179 MAKE_ERROR(temEMPTY_DID, "Malformed: No DID data provided."),
180 MAKE_ERROR(temINVALID, "The transaction is ill-formed."),
181 MAKE_ERROR(temINVALID_FLAG, "The transaction has an invalid flag."),
182 MAKE_ERROR(temREDUNDANT, "The transaction is redundant."),
183 MAKE_ERROR(temRIPPLE_EMPTY, "PathSet with no paths."),
184 MAKE_ERROR(temUNCERTAIN, "In process of determining result. Never returned."),
185 MAKE_ERROR(temUNKNOWN, "The transaction requires logic that is not implemented yet."),
186 MAKE_ERROR(temDISABLED, "The transaction requires logic that is currently disabled."),
187 MAKE_ERROR(temBAD_TICK_SIZE, "Malformed: Tick size out of range."),
188 MAKE_ERROR(temINVALID_ACCOUNT_ID, "Malformed: A field contains an invalid account ID."),
189 MAKE_ERROR(temCANNOT_PREAUTH_SELF, "Malformed: An account may not preauthorize itself."),
190 MAKE_ERROR(temINVALID_COUNT, "Malformed: Count field outside valid range."),
191 MAKE_ERROR(temSEQ_AND_TICKET, "Transaction contains a TicketSequence and a non-zero Sequence."),
192 MAKE_ERROR(temBAD_NFTOKEN_TRANSFER_FEE, "Malformed: The NFToken transfer fee must be between 1 and 5000, inclusive."),
193 MAKE_ERROR(temXCHAIN_EQUAL_DOOR_ACCOUNTS, "Malformed: Bridge must have unique door accounts."),
194 MAKE_ERROR(temXCHAIN_BAD_PROOF, "Malformed: Bad cross-chain claim proof."),
195 MAKE_ERROR(temXCHAIN_BRIDGE_BAD_ISSUES, "Malformed: Bad bridge issues."),
196 MAKE_ERROR(temXCHAIN_BRIDGE_NONDOOR_OWNER, "Malformed: Bridge owner must be one of the door accounts."),
197 MAKE_ERROR(temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT, "Malformed: Bad min account create amount."),
198 MAKE_ERROR(temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT, "Malformed: Bad reward amount."),
199 MAKE_ERROR(temARRAY_EMPTY, "Malformed: Array is empty."),
200 MAKE_ERROR(temARRAY_TOO_LARGE, "Malformed: Array is too large."),
201 MAKE_ERROR(temBAD_TRANSFER_FEE, "Malformed: Transfer fee is outside valid range."),
202 MAKE_ERROR(temINVALID_INNER_BATCH, "Malformed: Invalid inner batch transaction."),
203
204 MAKE_ERROR(terRETRY, "Retry transaction."),
205 MAKE_ERROR(terFUNDS_SPENT, "DEPRECATED."),
206 MAKE_ERROR(terINSUF_FEE_B, "Account balance can't pay fee."),
207 MAKE_ERROR(terLAST, "DEPRECATED."),
208 MAKE_ERROR(terNO_RIPPLE, "Path does not permit rippling."),
209 MAKE_ERROR(terNO_ACCOUNT, "The source account does not exist."),
210 MAKE_ERROR(terNO_AUTH, "Not authorized to hold IOUs."),
211 MAKE_ERROR(terNO_LINE, "No such line."),
212 MAKE_ERROR(terPRE_SEQ, "Missing/inapplicable prior transaction."),
213 MAKE_ERROR(terOWNERS, "Non-zero owner count."),
214 MAKE_ERROR(terQUEUED, "Held until escalated fee drops."),
215 MAKE_ERROR(terPRE_TICKET, "Ticket is not yet in ledger."),
216 MAKE_ERROR(terNO_AMM, "AMM doesn't exist for the asset pair."),
217 MAKE_ERROR(terADDRESS_COLLISION, "Failed to allocate an unique account address."),
218 MAKE_ERROR(terNO_DELEGATE_PERMISSION, "Delegated account lacks permission to perform this transaction."),
219
220 MAKE_ERROR(tesSUCCESS, "The transaction was applied. Only final in a validated ledger."),
221 };
222 // clang-format on
223
224#undef MAKE_ERROR
225
226 return results;
227}
228
229bool
231{
232 auto& results = transResults();
233
234 auto const r = results.find(TERtoInt(code));
235
236 if (r == results.end())
237 return false;
238
239 token = r->second.first;
240 text = r->second.second;
241 return true;
242}
243
246{
247 std::string token;
248 std::string text;
249
250 return transResultInfo(code, token, text) ? token : "-";
251}
252
255{
256 std::string token;
257 std::string text;
258
259 return transResultInfo(code, token, text) ? text : "-";
260}
261
264{
265 static auto const results = [] {
266 auto& byTer = transResults();
267 auto range = boost::make_iterator_range(byTer.begin(), byTer.end());
268 auto tRange = boost::adaptors::transform(range, [](auto const& r) {
269 return std::make_pair(r.second.first, r.first);
270 });
272 tRange.begin(), tRange.end());
273 return byToken;
274 }();
275
276 auto const r = results.find(token);
277
278 if (r == results.end())
279 return std::nullopt;
280
281 return TER::fromInt(r->second);
282}
283
284} // namespace ripple
static constexpr TERSubset fromInt(int from)
Definition TER.h:414
T is_same_v
T make_pair(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::string transHuman(TER code)
Definition TER.cpp:254
@ telWRONG_NETWORK
Definition TER.h:46
@ telLOCAL_ERROR
Definition TER.h:33
@ telCAN_NOT_QUEUE_BLOCKED
Definition TER.h:43
@ telBAD_PUBLIC_KEY
Definition TER.h:36
@ telBAD_PATH_COUNT
Definition TER.h:35
@ telFAILED_PROCESSING
Definition TER.h:37
@ telINSUF_FEE_P
Definition TER.h:38
@ telNO_DST_PARTIAL
Definition TER.h:39
@ telREQUIRES_NETWORK_ID
Definition TER.h:47
@ telCAN_NOT_QUEUE_FULL
Definition TER.h:45
@ telBAD_DOMAIN
Definition TER.h:34
@ telNETWORK_ID_MAKES_TX_NON_CANONICAL
Definition TER.h:48
@ telCAN_NOT_QUEUE
Definition TER.h:40
@ telCAN_NOT_QUEUE_BALANCE
Definition TER.h:41
@ telCAN_NOT_QUEUE_FEE
Definition TER.h:44
@ telCAN_NOT_QUEUE_BLOCKS
Definition TER.h:42
@ telENV_RPC_FAILED
Definition TER.h:49
@ tefNOT_MULTI_SIGNING
Definition TER.h:162
@ tefNO_AUTH_REQUIRED
Definition TER.h:155
@ tefPAST_SEQ
Definition TER.h:156
@ tefNO_TICKET
Definition TER.h:166
@ tefBAD_AUTH_MASTER
Definition TER.h:163
@ tefMAX_LEDGER
Definition TER.h:159
@ tefINVARIANT_FAILED
Definition TER.h:164
@ tefNFTOKEN_IS_NOT_TRANSFERABLE
Definition TER.h:167
@ tefFAILURE
Definition TER.h:147
@ tefINVALID_LEDGER_FIX_TYPE
Definition TER.h:168
@ tefEXCEPTION
Definition TER.h:153
@ tefWRONG_PRIOR
Definition TER.h:157
@ tefBAD_AUTH
Definition TER.h:150
@ tefBAD_QUORUM
Definition TER.h:161
@ tefBAD_SIGNATURE
Definition TER.h:160
@ tefBAD_LEDGER
Definition TER.h:151
@ tefBAD_ADD_AUTH
Definition TER.h:149
@ tefALREADY
Definition TER.h:148
@ tefMASTER_DISABLED
Definition TER.h:158
@ tefTOO_BIG
Definition TER.h:165
@ tefCREATED
Definition TER.h:152
@ tefINTERNAL
Definition TER.h:154
int TERUnderlyingType
Definition TER.h:19
std::string transToken(TER code)
Definition TER.cpp:245
@ tecNO_LINE_REDUNDANT
Definition TER.h:275
@ tecNO_ENTRY
Definition TER.h:288
@ tecCRYPTOCONDITION_ERROR
Definition TER.h:294
@ tecPSEUDO_ACCOUNT
Definition TER.h:344
@ tecNO_SUITABLE_NFTOKEN_PAGE
Definition TER.h:303
@ tecNO_DST
Definition TER.h:272
@ tecNO_LINE_INSUF_RESERVE
Definition TER.h:274
@ tecNEED_MASTER_KEY
Definition TER.h:290
@ tecINSUFF_FEE
Definition TER.h:284
@ tecXCHAIN_SELF_COMMIT
Definition TER.h:332
@ tecXCHAIN_WRONG_CHAIN
Definition TER.h:324
@ tecLIMIT_EXCEEDED
Definition TER.h:343
@ tecXCHAIN_INSUFF_CREATE_AMOUNT
Definition TER.h:328
@ tecXCHAIN_CREATE_ACCOUNT_DISABLED
Definition TER.h:334
@ tecINSUF_RESERVE_LINE
Definition TER.h:270
@ tecOBJECT_NOT_FOUND
Definition TER.h:308
@ tecINSUF_RESERVE_OFFER
Definition TER.h:271
@ tecNO_ISSUER
Definition TER.h:281
@ tecUNFUNDED
Definition TER.h:277
@ tecXCHAIN_NO_CLAIM_ID
Definition TER.h:319
@ tecTOO_SOON
Definition TER.h:300
@ tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE
Definition TER.h:323
@ tecNO_TARGET
Definition TER.h:286
@ tecDIR_FULL
Definition TER.h:269
@ tecNO_REGULAR_KEY
Definition TER.h:279
@ tecINCOMPLETE
Definition TER.h:317
@ tecNFTOKEN_OFFER_TYPE_MISMATCH
Definition TER.h:305
@ tecXCHAIN_PAYMENT_FAILED
Definition TER.h:331
@ tecUNFUNDED_OFFER
Definition TER.h:266
@ tecFROZEN
Definition TER.h:285
@ tecXCHAIN_CLAIM_NO_QUORUM
Definition TER.h:321
@ tecAMM_EMPTY
Definition TER.h:314
@ tecUNFUNDED_ADD
Definition TER.h:265
@ tecOWNERS
Definition TER.h:280
@ tecKILLED
Definition TER.h:298
@ tecXCHAIN_BAD_CLAIM_ID
Definition TER.h:320
@ tecXCHAIN_PROOF_UNKNOWN_KEY
Definition TER.h:322
@ tecDUPLICATE
Definition TER.h:297
@ tecINSUFFICIENT_FUNDS
Definition TER.h:307
@ tecNFTOKEN_BUY_SELL_MISMATCH
Definition TER.h:304
@ tecXCHAIN_ACCOUNT_CREATE_PAST
Definition TER.h:329
@ tecINTERNAL
Definition TER.h:292
@ tecBAD_CREDENTIALS
Definition TER.h:341
@ tecXCHAIN_BAD_TRANSFER_ISSUE
Definition TER.h:318
@ tecNO_PERMISSION
Definition TER.h:287
@ tecDST_TAG_NEEDED
Definition TER.h:291
@ tecPRECISION_LOSS
Definition TER.h:345
@ tecHAS_OBLIGATIONS
Definition TER.h:299
@ tecINVARIANT_FAILED
Definition TER.h:295
@ tecAMM_NOT_EMPTY
Definition TER.h:315
@ tecOVERSIZE
Definition TER.h:293
@ tecARRAY_TOO_LARGE
Definition TER.h:339
@ tecWRONG_ASSET
Definition TER.h:342
@ tecXCHAIN_REWARD_MISMATCH
Definition TER.h:325
@ tecCLAIM
Definition TER.h:263
@ tecINVALID_UPDATE_TIME
Definition TER.h:336
@ tecPATH_PARTIAL
Definition TER.h:264
@ tecUNFUNDED_AMM
Definition TER.h:310
@ tecAMM_ACCOUNT
Definition TER.h:316
@ tecAMM_FAILED
Definition TER.h:312
@ tecNO_LINE
Definition TER.h:283
@ tecMAX_SEQUENCE_REACHED
Definition TER.h:302
@ tecXCHAIN_SENDING_ACCOUNT_MISMATCH
Definition TER.h:327
@ tecINSUFFICIENT_PAYMENT
Definition TER.h:309
@ tecEMPTY_DID
Definition TER.h:335
@ tecNO_ALTERNATIVE_KEY
Definition TER.h:278
@ tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR
Definition TER.h:333
@ tecUNFUNDED_PAYMENT
Definition TER.h:267
@ tecPATH_DRY
Definition TER.h:276
@ tecXCHAIN_NO_SIGNERS_LIST
Definition TER.h:326
@ tecAMM_INVALID_TOKENS
Definition TER.h:313
@ tecAMM_BALANCE
Definition TER.h:311
@ tecINSUFFICIENT_RESERVE
Definition TER.h:289
@ tecARRAY_EMPTY
Definition TER.h:338
@ tecXCHAIN_ACCOUNT_CREATE_TOO_MANY
Definition TER.h:330
@ tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
Definition TER.h:306
@ tecFAILED_PROCESSING
Definition TER.h:268
@ tecEXPIRED
Definition TER.h:296
@ tecTOKEN_PAIR_NOT_FOUND
Definition TER.h:337
@ tecNO_DST_INSUF_XRP
Definition TER.h:273
@ tecNO_AUTH
Definition TER.h:282
@ tecLOCKED
Definition TER.h:340
@ tesSUCCESS
Definition TER.h:226
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition TER.h:356
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
Definition RangeSet.h:35
std::unordered_map< TERUnderlyingType, std::pair< char const *const, char const *const > > const & transResults()
Definition TER.cpp:16
@ terADDRESS_COLLISION
Definition TER.h:209
@ terINSUF_FEE_B
Definition TER.h:197
@ terOWNERS
Definition TER.h:201
@ terRETRY
Definition TER.h:195
@ terFUNDS_SPENT
Definition TER.h:196
@ terNO_ACCOUNT
Definition TER.h:198
@ terLAST
Definition TER.h:204
@ terNO_RIPPLE
Definition TER.h:205
@ terNO_AMM
Definition TER.h:208
@ terPRE_SEQ
Definition TER.h:202
@ terQUEUED
Definition TER.h:206
@ terNO_AUTH
Definition TER.h:199
@ terPRE_TICKET
Definition TER.h:207
@ terNO_DELEGATE_PERMISSION
Definition TER.h:211
@ terNO_LINE
Definition TER.h:200
bool transResultInfo(TER code, std::string &token, std::string &text)
Definition TER.cpp:230
std::optional< TER > transCode(std::string const &token)
Definition TER.cpp:263
@ temBAD_ISSUER
Definition TER.h:74
@ temBAD_SEND_XRP_PARTIAL
Definition TER.h:83
@ temBAD_AMOUNT
Definition TER.h:70
@ temBAD_SRC_ACCOUNT
Definition TER.h:87
@ temREDUNDANT
Definition TER.h:93
@ temBAD_LIMIT
Definition TER.h:75
@ temBAD_PATH_LOOP
Definition TER.h:78
@ temUNKNOWN
Definition TER.h:105
@ temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT
Definition TER.h:116
@ temBAD_PATH
Definition TER.h:77
@ temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT
Definition TER.h:117
@ temBAD_FEE
Definition TER.h:73
@ temBAD_SIGNER
Definition TER.h:96
@ temSEQ_AND_TICKET
Definition TER.h:107
@ temXCHAIN_EQUAL_DOOR_ACCOUNTS
Definition TER.h:112
@ temDST_NEEDED
Definition TER.h:90
@ temUNCERTAIN
Definition TER.h:104
@ temINVALID_INNER_BATCH
Definition TER.h:124
@ temBAD_REGKEY
Definition TER.h:79
@ temBAD_CURRENCY
Definition TER.h:71
@ temBAD_TRANSFER_FEE
Definition TER.h:123
@ temBAD_SEND_XRP_LIMIT
Definition TER.h:80
@ temBAD_SEQUENCE
Definition TER.h:85
@ temINVALID_COUNT
Definition TER.h:102
@ temXCHAIN_BRIDGE_NONDOOR_OWNER
Definition TER.h:115
@ temMALFORMED
Definition TER.h:68
@ temINVALID
Definition TER.h:91
@ temBAD_SEND_XRP_PATHS
Definition TER.h:84
@ temBAD_EXPIRATION
Definition TER.h:72
@ temBAD_AMM_TOKENS
Definition TER.h:110
@ temBAD_OFFER
Definition TER.h:76
@ temINVALID_FLAG
Definition TER.h:92
@ temXCHAIN_BRIDGE_BAD_ISSUES
Definition TER.h:114
@ temARRAY_EMPTY
Definition TER.h:121
@ temBAD_SEND_XRP_NO_DIRECT
Definition TER.h:82
@ temBAD_QUORUM
Definition TER.h:97
@ temARRAY_TOO_LARGE
Definition TER.h:122
@ temBAD_TICK_SIZE
Definition TER.h:99
@ temBAD_WEIGHT
Definition TER.h:98
@ temDISABLED
Definition TER.h:95
@ temDST_IS_SRC
Definition TER.h:89
@ temBAD_TRANSFER_RATE
Definition TER.h:88
@ temXCHAIN_BAD_PROOF
Definition TER.h:113
@ temEMPTY_DID
Definition TER.h:119
@ temRIPPLE_EMPTY
Definition TER.h:94
@ temCANNOT_PREAUTH_SELF
Definition TER.h:101
@ temBAD_SEND_XRP_MAX
Definition TER.h:81
@ temINVALID_ACCOUNT_ID
Definition TER.h:100
@ temBAD_SIGNATURE
Definition TER.h:86
@ temBAD_NFTOKEN_TRANSFER_FEE
Definition TER.h:108