MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / ScriptErrorString

Function ScriptErrorString

src/script/script_error.cpp:10–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <string>
9
10std::string ScriptErrorString(const ScriptError serror) {
11 switch (serror) {
12 case ScriptError::OK:
13 return "No error";
14 case ScriptError::EVAL_FALSE:
15 return "Script evaluated without error but finished with a "
16 "false/empty top stack element";
17 case ScriptError::VERIFY:
18 return "Script failed an OP_VERIFY operation";
19 case ScriptError::EQUALVERIFY:
20 return "Script failed an OP_EQUALVERIFY operation";
21 case ScriptError::CHECKMULTISIGVERIFY:
22 return "Script failed an OP_CHECKMULTISIGVERIFY operation";
23 case ScriptError::CHECKSIGVERIFY:
24 return "Script failed an OP_CHECKSIGVERIFY operation";
25 case ScriptError::CHECKDATASIGVERIFY:
26 return "Script failed an OP_CHECKDATASIGVERIFY operation";
27 case ScriptError::NUMEQUALVERIFY:
28 return "Script failed an OP_NUMEQUALVERIFY operation";
29 case ScriptError::SCRIPT_SIZE:
30 return "Script is too big";
31 case ScriptError::PUSH_SIZE:
32 return "Push value size limit exceeded";
33 case ScriptError::OP_COUNT:
34 return "Operation limit exceeded";
35 case ScriptError::STACK_SIZE:
36 return "Stack size limit exceeded";
37 case ScriptError::SIG_COUNT:
38 return "Signature count negative or greater than pubkey count";
39 case ScriptError::PUBKEY_COUNT:
40 return "Pubkey count negative or limit exceeded";
41 case ScriptError::INPUT_SIGCHECKS:
42 return "Input SigChecks limit exceeded";
43 case ScriptError::INVALID_OPERAND_SIZE:
44 return "Invalid operand size";
45 case ScriptError::INTEGER_OVERFLOW:
46 return "Integer overflow";
47 case ScriptError::BAD_INTEGER_ENCODING:
48 return "Integer non-minimally encoded";
49 case ScriptError::IMPOSSIBLE_ENCODING:
50 return "The requested encoding is impossible to satisfy";
51 case ScriptError::INVALID_SPLIT_RANGE:
52 return "Invalid OP_SPLIT range";
53 case ScriptError::INVALID_BIT_COUNT:
54 return "Invalid number of bit set in OP_CHECKMULTISIG";
55 case ScriptError::BAD_OPCODE:
56 return "Opcode missing or not understood";
57 case ScriptError::DISABLED_OPCODE:
58 return "Attempted to use a disabled opcode";
59 case ScriptError::INVALID_STACK_OPERATION:
60 return "Operation not valid with the current stack size";
61 case ScriptError::INVALID_ALTSTACK_OPERATION:
62 return "Operation not valid with the current altstack size";
63 case ScriptError::OP_RETURN:
64 return "OP_RETURN was encountered";
65 case ScriptError::UNBALANCED_CONDITIONAL:
66 return "Invalid OP_IF construction";
67 case ScriptError::DIV_BY_ZERO:

Callers 10

CheckInputScriptsFunction · 0.85
ConnectBlockMethod · 0.85
SignTransactionFunction · 0.85
FormatTraceMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
setup_common.cppFile · 0.85

Calls

no outgoing calls

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68