PRCYCoin  2.0.0.7rc1
P2P Digital Currency
script_error.cpp
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin 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_error.h"
7 
8 const char* ScriptErrorString(const ScriptError serror)
9 {
10  switch (serror)
11  {
12  case SCRIPT_ERR_OK:
13  return "No error";
15  return "Script evaluated without error but finished with a false/empty top stack element";
16  case SCRIPT_ERR_VERIFY:
17  return "Script failed an OP_VERIFY operation";
19  return "Script failed an OP_EQUALVERIFY operation";
21  return "Script failed an OP_CHECKMULTISIGVERIFY operation";
23  return "Script failed an OP_CHECKSIGVERIFY operation";
25  return "Script failed an OP_NUMEQUALVERIFY operation";
27  return "Script is too big";
29  return "Push value size limit exceeded";
31  return "Operation limit exceeded";
33  return "Stack size limit exceeded";
35  return "Signature count negative or greater than pubkey count";
37  return "Pubkey count negative or limit exceeded";
39  return "Opcode missing or not understood";
41  return "Attempted to use a disabled opcode";
43  return "Operation not valid with the current stack size";
45  return "Operation not valid with the current altstack size";
47  return "OP_RETURN was encountered";
49  return "Invalid OP_IF construction";
51  return "Negative locktime";
53  return "Locktime requirement not satisfied";
55  return "Signature hash type missing or not understood";
56  case SCRIPT_ERR_SIG_DER:
57  return "Non-canonical DER signature";
59  return "Data push larger than necessary";
61  return "Only non-push operators allowed in signatures";
63  return "Non-canonical signature: S value is unnecessarily high";
65  return "Dummy CHECKMULTISIG argument must be zero";
67  return "NOPx reserved for soft-fork upgrades";
69  return "Public key is neither compressed or uncompressed";
72  default: break;
73  }
74  return "unknown error";
75 }
SCRIPT_ERR_OP_COUNT
@ SCRIPT_ERR_OP_COUNT
Definition: script_error.h:19
SCRIPT_ERR_NEGATIVE_LOCKTIME
@ SCRIPT_ERR_NEGATIVE_LOCKTIME
Definition: script_error.h:39
SCRIPT_ERR_INVALID_ALTSTACK_OPERATION
@ SCRIPT_ERR_INVALID_ALTSTACK_OPERATION
Definition: script_error.h:35
SCRIPT_ERR_OK
@ SCRIPT_ERR_OK
Definition: script_error.h:11
ScriptErrorString
const char * ScriptErrorString(const ScriptError serror)
Definition: script_error.cpp:8
SCRIPT_ERR_SIG_DER
@ SCRIPT_ERR_SIG_DER
Definition: script_error.h:44
SCRIPT_ERR_OP_RETURN
@ SCRIPT_ERR_OP_RETURN
Definition: script_error.h:14
SCRIPT_ERR_SIG_PUSHONLY
@ SCRIPT_ERR_SIG_PUSHONLY
Definition: script_error.h:46
SCRIPT_ERR_EVAL_FALSE
@ SCRIPT_ERR_EVAL_FALSE
Definition: script_error.h:13
SCRIPT_ERR_CHECKMULTISIGVERIFY
@ SCRIPT_ERR_CHECKMULTISIGVERIFY
Definition: script_error.h:27
SCRIPT_ERR_MINIMALDATA
@ SCRIPT_ERR_MINIMALDATA
Definition: script_error.h:45
ScriptError
enum ScriptError_t ScriptError
SCRIPT_ERR_DISABLED_OPCODE
@ SCRIPT_ERR_DISABLED_OPCODE
Definition: script_error.h:33
SCRIPT_ERR_SIG_COUNT
@ SCRIPT_ERR_SIG_COUNT
Definition: script_error.h:21
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS
@ SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS
Definition: script_error.h:52
SCRIPT_ERR_PUSH_SIZE
@ SCRIPT_ERR_PUSH_SIZE
Definition: script_error.h:18
SCRIPT_ERR_STACK_SIZE
@ SCRIPT_ERR_STACK_SIZE
Definition: script_error.h:20
SCRIPT_ERR_EQUALVERIFY
@ SCRIPT_ERR_EQUALVERIFY
Definition: script_error.h:26
SCRIPT_ERR_SCRIPT_SIZE
@ SCRIPT_ERR_SCRIPT_SIZE
Definition: script_error.h:17
SCRIPT_ERR_SIG_HASHTYPE
@ SCRIPT_ERR_SIG_HASHTYPE
Definition: script_error.h:43
SCRIPT_ERR_INVALID_STACK_OPERATION
@ SCRIPT_ERR_INVALID_STACK_OPERATION
Definition: script_error.h:34
SCRIPT_ERR_CHECKSIGVERIFY
@ SCRIPT_ERR_CHECKSIGVERIFY
Definition: script_error.h:28
SCRIPT_ERR_UNBALANCED_CONDITIONAL
@ SCRIPT_ERR_UNBALANCED_CONDITIONAL
Definition: script_error.h:36
SCRIPT_ERR_PUBKEY_COUNT
@ SCRIPT_ERR_PUBKEY_COUNT
Definition: script_error.h:22
script_error.h
SCRIPT_ERR_SIG_HIGH_S
@ SCRIPT_ERR_SIG_HIGH_S
Definition: script_error.h:47
SCRIPT_ERR_VERIFY
@ SCRIPT_ERR_VERIFY
Definition: script_error.h:25
SCRIPT_ERR_NUMEQUALVERIFY
@ SCRIPT_ERR_NUMEQUALVERIFY
Definition: script_error.h:29
SCRIPT_ERR_SIG_NULLDUMMY
@ SCRIPT_ERR_SIG_NULLDUMMY
Definition: script_error.h:48
SCRIPT_ERR_BAD_OPCODE
@ SCRIPT_ERR_BAD_OPCODE
Definition: script_error.h:32
SCRIPT_ERR_UNKNOWN_ERROR
@ SCRIPT_ERR_UNKNOWN_ERROR
Definition: script_error.h:12
SCRIPT_ERR_UNSATISFIED_LOCKTIME
@ SCRIPT_ERR_UNSATISFIED_LOCKTIME
Definition: script_error.h:40
SCRIPT_ERR_PUBKEYTYPE
@ SCRIPT_ERR_PUBKEYTYPE
Definition: script_error.h:49
SCRIPT_ERR_ERROR_COUNT
@ SCRIPT_ERR_ERROR_COUNT
Definition: script_error.h:54