Changeset View
Changeset View
Standalone View
Standalone View
src/script/script_error.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <script/script_error.h> | #include <script/script_error.h> | ||||
const char *ScriptErrorString(const ScriptError serror) { | #include <string> | ||||
std::string ScriptErrorString(const ScriptError serror) { | |||||
switch (serror) { | switch (serror) { | ||||
case ScriptError::OK: | case ScriptError::OK: | ||||
return "No error"; | return "No error"; | ||||
case ScriptError::EVAL_FALSE: | case ScriptError::EVAL_FALSE: | ||||
return "Script evaluated without error but finished with a " | return "Script evaluated without error but finished with a " | ||||
"false/empty top stack element"; | "false/empty top stack element"; | ||||
case ScriptError::VERIFY: | case ScriptError::VERIFY: | ||||
return "Script failed an OP_VERIFY operation"; | return "Script failed an OP_VERIFY operation"; | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |