Bitcoin ABC  0.26.3
P2P Digital Currency
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or
6 #include <script/script_error.h>
8 #include <string>
10 std::string ScriptErrorString(const ScriptError serror) {
11  switch (serror) {
12  case ScriptError::OK:
13  return "No error";
15  return "Script evaluated without error but finished with a "
16  "false/empty top stack element";
18  return "Script failed an OP_VERIFY operation";
20  return "Script failed an OP_EQUALVERIFY operation";
22  return "Script failed an OP_CHECKMULTISIGVERIFY operation";
24  return "Script failed an OP_CHECKSIGVERIFY operation";
26  return "Script failed an OP_CHECKDATASIGVERIFY operation";
28  return "Script failed an OP_NUMEQUALVERIFY operation";
30  return "Script is too big";
32  return "Push value size limit exceeded";
34  return "Operation limit exceeded";
36  return "Stack size limit exceeded";
38  return "Signature count negative or greater than pubkey count";
40  return "Pubkey count negative or limit exceeded";
42  return "Input SigChecks limit exceeded";
44  return "Invalid operand size";
46  return "Given operand is not a number within the valid range "
47  "[-2^31...2^31]";
49  return "The requested encoding is impossible to satisfy";
51  return "Invalid OP_SPLIT range";
53  return "Invalid number of bit set in OP_CHECKMULTISIG";
55  return "Opcode missing or not understood";
57  return "Attempted to use a disabled opcode";
59  return "Operation not valid with the current stack size";
61  return "Operation not valid with the current altstack size";
63  return "OP_RETURN was encountered";
65  return "Invalid OP_IF construction";
67  return "Division by zero error";
69  return "Modulo by zero error";
71  return "Bitfield of unexpected size error";
73  return "Bitfield's bit out of the expected range";
75  return "Negative locktime";
77  return "Locktime requirement not satisfied";
79  return "Signature hash type missing or not understood";
81  return "Non-canonical DER signature";
83  return "Data push larger than necessary";
85  return "Only push operators allowed in signatures";
87  return "Non-canonical signature: S value is unnecessarily high";
89  return "OP_IF/NOTIF argument must be minimal";
91  return "Signature must be zero for failed CHECK(MULTI)SIG "
92  "operation";
94  return "Signature cannot be 65 bytes in CHECKMULTISIG";
96  return "Only Schnorr signatures allowed in this operation";
98  return "NOPx reserved for soft-fork upgrades";
100  return "Public key is neither compressed or uncompressed";
102  return "Stack size must be exactly one after execution";
104  return "Illegal use of SIGHASH_FORKID";
106  return "Signature must use SIGHASH_FORKID";
108  return "Validation resources exceeded (SigChecks)";
111  default:
112  break;
113  }
114  return "unknown error";
115 }
std::string ScriptErrorString(const ScriptError serror)
Definition: script_error.h:11