aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet_errors.h')
-rw-r--r--src/wallet/wallet_errors.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h
index 93e7c2ec3..785a72e4b 100644
--- a/src/wallet/wallet_errors.h
+++ b/src/wallet/wallet_errors.h
@@ -626,6 +626,18 @@ namespace tools
std::string m_request;
};
//----------------------------------------------------------------------------------------------------
+ struct wallet_generic_rpc_error : public wallet_rpc_error
+ {
+ explicit wallet_generic_rpc_error(std::string&& loc, const std::string& request, const std::string& status)
+ : wallet_rpc_error(std::move(loc), std::string("error in ") + request + " RPC: " + status, request),
+ m_status(status)
+ {
+ }
+ const std::string& status() const { return m_status; }
+ private:
+ const std::string m_status;
+ };
+ //----------------------------------------------------------------------------------------------------
struct daemon_busy : public wallet_rpc_error
{
explicit daemon_busy(std::string&& loc, const std::string& request)