Scorum
exceptions.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <fc/exception/exception.hpp>
5 
6 #define SCORUM_ASSERT(expr, exc_type, FORMAT, ...) \
7  FC_MULTILINE_MACRO_BEGIN \
8  if (!(expr)) \
9  FC_THROW_EXCEPTION(exc_type, FORMAT, __VA_ARGS__); \
10  FC_MULTILINE_MACRO_END
11 
12 namespace scorum {
13 namespace protocol {
14 
15 FC_DECLARE_EXCEPTION(transaction_exception, 3000000, "transaction exception")
17  tx_missing_active_auth, scorum::protocol::transaction_exception, 3010000, "missing required active authority")
19  tx_missing_owner_auth, scorum::protocol::transaction_exception, 3020000, "missing required owner authority")
21  tx_missing_posting_auth, scorum::protocol::transaction_exception, 3030000, "missing required posting authority")
23  tx_missing_other_auth, scorum::protocol::transaction_exception, 3040000, "missing required other authority")
25  tx_irrelevant_sig, scorum::protocol::transaction_exception, 3050000, "irrelevant signature included")
27  tx_duplicate_sig, scorum::protocol::transaction_exception, 3060000, "duplicate signature included")
28 
29 #define SCORUM_RECODE_EXC(cause_type, effect_type) \
30  catch (const cause_type& e) { throw(effect_type(e.what(), e.get_log())); }
31 }
32 } // scorum::protocol
FC_DECLARE_DERIVED_EXCEPTION(tx_missing_active_auth, scorum::protocol::transaction_exception, 3010000, "missing required active authority") FC_DECLARE_DERIVED_EXCEPTION(tx_missing_owner_auth
Definition: asset.cpp:15