-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexceptions.hpp
32 lines (27 loc) · 970 Bytes
/
exceptions.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#pragma once
namespace ra
{
class not_implemented_exception : public std::logic_error
{
public:
not_implemented_exception(
std::string function = __builtin_FUNCTION()) : std::logic_error("`" + function + "` not implemented!"){};
};
class invalid_transaction_error : public std::logic_error
{
public:
invalid_transaction_error(std::string transaction) : std::logic_error("Invalid Transaction!" + transaction){};
};
class public_key_mismatch : public std::invalid_argument
{
public:
public_key_mismatch(
std::string addr, std::string pk) : std::invalid_argument("from_addr: '" + addr + "' do not match public_key: '" + pk + "'"){};
};
class resign_transaction_exception : public std::logic_error
{
public:
resign_transaction_exception(std::string transaction) : std::logic_error("Resigning Transaction!" + transaction){};
};
}