Bitcoin ABC  0.22.12
P2P Digital Currency
script_error.cpp
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 http://www.opensource.org/licenses/mit-license.php.
5 
6 #include <script/script_error.h>
7 
8 const char *ScriptErrorString(const ScriptError serror) {
9  switch (serror) {
10  case ScriptError::OK:
11  return "No error";
13  return "Script evaluated without error but finished with a "
14  "false/empty top stack element";
16  return "Script failed an OP_VERIFY operation";
18  return "Script failed an OP_EQUALVERIFY operation";
20  return "Script failed an OP_CHECKMULTISIGVERIFY operation";
22  return "Script failed an OP_CHECKSIGVERIFY operation";
24  return "Script failed an OP_CHECKDATASIGVERIFY operation";
26  return "Script failed an OP_NUMEQUALVERIFY operation";
28  return "Script is too big";
30  return "Push value size limit exceeded";
32  return "Operation limit exceeded";
34  return "Stack size limit exceeded";
36  return "Signature count negative or greater than pubkey count";
38  return "Pubkey count negative or limit exceeded";
40  return "Input SigChecks limit exceeded";
42  return "Invalid operand size";
44  return "Given operand is not a number within the valid range "
45  "[-2^31...2^31]";
47  return "The requested encoding is impossible to satisfy";
49  return "Invalid OP_SPLIT range";
51  return "Invalid number of bit set in OP_CHECKMULTISIG";
53  return "Opcode missing or not understood";
55  return "Attempted to use a disabled opcode";
57  return "Operation not valid with the current stack size";
59  return "Operation not valid with the current altstack size";
61  return "OP_RETURN was encountered";
63  return "Invalid OP_IF construction";
65  return "Division by zero error";
67  return "Modulo by zero error";
69  return "Bitfield of unexpected size error";
71  return "Bitfield's bit out of the expected range";
73  return "Negative locktime";
75  return "Locktime requirement not satisfied";
77  return "Signature hash type missing or not understood";
79  return "Non-canonical DER signature";
81  return "Data push larger than necessary";
83  return "Only push operators allowed in signatures";
85  return "Non-canonical signature: S value is unnecessarily high";
87  return "OP_IF/NOTIF argument must be minimal";
89  return "Signature must be zero for failed CHECK(MULTI)SIG "
90  "operation";
92  return "Signature cannot be 65 bytes in CHECKMULTISIG";
94  return "Only Schnorr signatures allowed in this operation";
96  return "NOPx reserved for soft-fork upgrades";
98  return "Public key is neither compressed or uncompressed";
100  return "Extra items left on stack after execution";
102  return "Illegal use of SIGHASH_FORKID";
104  return "Signature must use SIGHASH_FORKID";
106  return "Validation resources exceeded (SigChecks)";
109  default:
110  break;
111  }
112  return "unknown error";
113 }
ScriptError
Definition: script_error.h:9
const char * ScriptErrorString(const ScriptError serror)
Definition: script_error.cpp:8