MCPcopy Create free account
hub / github.com/bitcoin-sv/bitcoin-sv / ScriptErrorString

Function ScriptErrorString

src/script/script_error.cpp:9–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <iostream>
8
9const char *ScriptErrorString(const ScriptError serror) {
10 switch (serror) {
11 case SCRIPT_ERR_OK:
12 return "No error";
13 case SCRIPT_ERR_EVAL_FALSE:
14 return "Script evaluated without error but finished with a "
15 "false/empty top stack element";
16 case SCRIPT_ERR_VERIFY:
17 return "Script failed an OP_VERIFY operation";
18 case SCRIPT_ERR_EQUALVERIFY:
19 return "Script failed an OP_EQUALVERIFY operation";
20 case SCRIPT_ERR_CHECKMULTISIGVERIFY:
21 return "Script failed an OP_CHECKMULTISIGVERIFY operation";
22 case SCRIPT_ERR_CHECKSIGVERIFY:
23 return "Script failed an OP_CHECKSIGVERIFY operation";
24 case SCRIPT_ERR_NUMEQUALVERIFY:
25 return "Script failed an OP_NUMEQUALVERIFY operation";
26 case SCRIPT_ERR_SCRIPT_SIZE:
27 return "Script is too big";
28 case SCRIPT_ERR_PUSH_SIZE:
29 return "Push value size limit exceeded";
30 case SCRIPT_ERR_OP_COUNT:
31 return "Operation limit exceeded";
32 case SCRIPT_ERR_STACK_SIZE:
33 return "Stack size limit exceeded";
34 case SCRIPT_ERR_SIG_COUNT:
35 return "Signature count negative or greater than pubkey count";
36 case SCRIPT_ERR_PUBKEY_COUNT:
37 return "Pubkey count negative or limit exceeded";
38 case SCRIPT_ERR_INVALID_OPERAND_SIZE:
39 return "Invalid operand size";
40 case SCRIPT_ERR_INVALID_NUMBER_RANGE:
41 return "Given operand is not a number within the valid range "
42 "[-2^31...2^31]";
43 case SCRIPT_ERR_IMPOSSIBLE_ENCODING:
44 return "The requested encoding is impossible to satisfy";
45 case SCRIPT_ERR_INVALID_SPLIT_RANGE:
46 return "Invalid OP_SPLIT range";
47 case SCRIPT_ERR_SCRIPTNUM_OVERFLOW:
48 return "Script number overflow";
49 case SCRIPT_ERR_SCRIPTNUM_MINENCODE:
50 return "Non-minimally encoded script number";
51 case SCRIPT_ERR_BAD_OPCODE:
52 return "Opcode missing or not understood";
53 case SCRIPT_ERR_DISABLED_OPCODE:
54 return "Attempted to use a disabled opcode";
55 case SCRIPT_ERR_INVALID_STACK_OPERATION:
56 return "Operation not valid with the current stack size";
57 case SCRIPT_ERR_INVALID_ALTSTACK_OPERATION:
58 return "Operation not valid with the current altstack size";
59 case SCRIPT_ERR_OP_RETURN:
60 return "OP_RETURN was encountered";
61 case SCRIPT_ERR_UNBALANCED_CONDITIONAL:
62 return "Invalid OP_IF construction";
63 case SCRIPT_ERR_DIV_BY_ZERO:
64 return "Division by zero error";
65 case SCRIPT_ERR_MOD_BY_ZERO:
66 return "Modulo by zero error";

Callers 10

CheckInputScriptsFunction · 0.85
BlockValidateTxnsMethod · 0.85
checkScriptsMethod · 0.85
script_error.cppFile · 0.85
RunTestsFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
signrawtransactionFunction · 0.85
verifyscriptFunction · 0.85

Calls

no outgoing calls

Tested by 4

RunTestsFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68