Scorum
Namespaces | Macros | Functions
database_exceptions.hpp File Reference
#include <scorum/protocol/exceptions.hpp>
#include <fc/exception/exception.hpp>

Go to the source code of this file.

Namespaces

 scorum
 
 scorum::chain
 

Macros

#define SCORUM_DECLARE_OP_BASE_EXCEPTIONS(op_name)
 
#define SCORUM_DECLARE_OP_VALIDATE_EXCEPTION(exc_name, op_name, seqnum, msg)
 
#define SCORUM_DECLARE_OP_EVALUATE_EXCEPTION(exc_name, op_name, seqnum, msg)
 
#define SCORUM_DECLARE_INTERNAL_EXCEPTION(exc_name, seqnum, msg)    FC_DECLARE_DERIVED_EXCEPTION(internal_##exc_name, scorum::chain::internal_exception, 4990000 + seqnum, msg)
 
#define SCORUM_TRY_NOTIFY(signal, ...)
 

Functions

 scorum::chain::FC_DECLARE_DERIVED_EXCEPTION (database_query_exception, scorum::chain::chain_exception, 4010000, "database query exception") FC_DECLARE_DERIVED_EXCEPTION(block_validate_exception
 
block validation exception scorum::chain::FC_DECLARE_DERIVED_EXCEPTION (transaction_exception, scorum::chain::chain_exception, 4030000, "transaction validation exception") FC_DECLARE_DERIVED_EXCEPTION(operation_validate_exception
 
block validation exception operation validation exception scorum::chain::FC_DECLARE_DERIVED_EXCEPTION (operation_evaluate_exception, scorum::chain::chain_exception, 4050000, "operation evaluation exception") FC_DECLARE_DERIVED_EXCEPTION(undo_database_exception
 
block validation exception operation validation exception undo database exception scorum::chain::FC_DECLARE_DERIVED_EXCEPTION (unknown_hardfork_exception, scorum::chain::chain_exception, 4090000, "chain attempted to apply unknown hardfork") FC_DECLARE_DERIVED_EXCEPTION(transaction_expiration_exception
 
block validation exception operation validation exception undo database exception transaction expiration exception scorum::chain::FC_DECLARE_DERIVED_EXCEPTION (transaction_tapos_exception, scorum::chain::transaction_exception, 4030200, "transaction tapos exception") FC_DECLARE_DERIVED_EXCEPTION(pop_empty_chain
 
block validation exception operation validation exception undo database exception transaction expiration exception there are no blocks to pop scorum::chain::SCORUM_DECLARE_OP_BASE_EXCEPTIONS (transfer)
 
 scorum::chain::SCORUM_DECLARE_OP_BASE_EXCEPTIONS (account_create)
 
 scorum::chain::SCORUM_DECLARE_OP_BASE_EXCEPTIONS (account_update)
 

Macro Definition Documentation

◆ SCORUM_DECLARE_INTERNAL_EXCEPTION

#define SCORUM_DECLARE_INTERNAL_EXCEPTION (   exc_name,
  seqnum,
  msg 
)     FC_DECLARE_DERIVED_EXCEPTION(internal_##exc_name, scorum::chain::internal_exception, 4990000 + seqnum, msg)

Definition at line 23 of file database_exceptions.hpp.

◆ SCORUM_DECLARE_OP_BASE_EXCEPTIONS

#define SCORUM_DECLARE_OP_BASE_EXCEPTIONS (   op_name)
Value:
FC_DECLARE_DERIVED_EXCEPTION(op_name##_validate_exception, scorum::chain::operation_validate_exception, \
4040000 + 100 * protocol::operation::tag<protocol::op_name##_operation>::value, \
#op_name "_operation validation exception") \
FC_DECLARE_DERIVED_EXCEPTION(op_name##_evaluate_exception, scorum::chain::operation_evaluate_exception, \
4050000 + 100 * protocol::operation::tag<protocol::op_name##_operation>::value, \
#op_name "_operation evaluation exception")
block validation exception operation validation exception undo database exception transaction expiration exception FC_DECLARE_DERIVED_EXCEPTION(transaction_tapos_exception, scorum::chain::transaction_exception, 4030200, "transaction tapos exception") FC_DECLARE_DERIVED_EXCEPTION(pop_empty_chain

Definition at line 5 of file database_exceptions.hpp.

◆ SCORUM_DECLARE_OP_EVALUATE_EXCEPTION

#define SCORUM_DECLARE_OP_EVALUATE_EXCEPTION (   exc_name,
  op_name,
  seqnum,
  msg 
)
Value:
op_name##_##exc_name, scorum::chain::op_name##_evaluate_exception, \
4050000 + 100 * protocol::operation::tag<protocol::op_name##_operation>::value + seqnum, msg)

Definition at line 18 of file database_exceptions.hpp.

◆ SCORUM_DECLARE_OP_VALIDATE_EXCEPTION

#define SCORUM_DECLARE_OP_VALIDATE_EXCEPTION (   exc_name,
  op_name,
  seqnum,
  msg 
)
Value:
op_name##_##exc_name, scorum::chain::op_name##_validate_exception, \
4040000 + 100 * protocol::operation::tag<protocol::op_name##_operation>::value + seqnum, msg)

Definition at line 13 of file database_exceptions.hpp.

◆ SCORUM_TRY_NOTIFY

#define SCORUM_TRY_NOTIFY (   signal,
  ... 
)
Value:
try \
{ \
signal(__VA_ARGS__); \
} \
catch (const scorum::chain::plugin_exception& e) \
{ \
throw; \
} \
catch (const fc::exception& e) \
{ \
elog("Caught exception in plugin: ${e}", ("e", e.to_detail_string())); \
} \
catch (...) \
{ \
wlog("Caught unexpected exception in plugin"); \
}

Definition at line 26 of file database_exceptions.hpp.