MCPcopy Create free account
hub / github.com/BitcoinUnlimited/BitcoinUnlimited / ScriptErrorString

Function ScriptErrorString

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

Source from the content-addressed store, hash-verified

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

Callers 9

validateMethod · 0.85
operator()Method · 0.85
CheckInputsFunction · 0.85
evalForSigChecksFunction · 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
signrawtransactionFunction · 0.85

Calls

no outgoing calls

Tested by 5

evalForSigChecksFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68