32 #define GRAPHENE_DECLARE_OP_BASE_EXCEPTIONS( op_name ) \
33 FC_DECLARE_DERIVED_EXCEPTION( \
34 op_name ## _validate_exception, \
35 graphene::chain::operation_validate_exception, \
36 3040000 + 100 * operation::tag< op_name ## _operation >::value \
38 FC_DECLARE_DERIVED_EXCEPTION( \
39 op_name ## _evaluate_exception, \
40 graphene::chain::operation_evaluate_exception, \
41 3050000 + 100 * operation::tag< op_name ## _operation >::value \
44 #define GRAPHENE_IMPLEMENT_OP_BASE_EXCEPTIONS( op_name ) \
45 FC_IMPLEMENT_DERIVED_EXCEPTION( \
46 op_name ## _validate_exception, \
47 graphene::chain::operation_validate_exception, \
48 3040000 + 100 * operation::tag< op_name ## _operation >::value, \
49 #op_name "_operation validation exception" \
51 FC_IMPLEMENT_DERIVED_EXCEPTION( \
52 op_name ## _evaluate_exception, \
53 graphene::chain::operation_evaluate_exception, \
54 3050000 + 100 * operation::tag< op_name ## _operation >::value, \
55 #op_name "_operation evaluation exception" \
58 #define GRAPHENE_DECLARE_OP_VALIDATE_EXCEPTION( exc_name, op_name, seqnum ) \
59 FC_DECLARE_DERIVED_EXCEPTION( \
60 op_name ## _ ## exc_name, \
61 graphene::chain::op_name ## _validate_exception, \
62 3040000 + 100 * operation::tag< op_name ## _operation >::value \
66 #define GRAPHENE_IMPLEMENT_OP_VALIDATE_EXCEPTION( exc_name, op_name, seqnum, msg ) \
67 FC_IMPLEMENT_DERIVED_EXCEPTION( \
68 op_name ## _ ## exc_name, \
69 graphene::chain::op_name ## _validate_exception, \
70 3040000 + 100 * operation::tag< op_name ## _operation >::value \
75 #define GRAPHENE_DECLARE_OP_EVALUATE_EXCEPTION( exc_name, op_name, seqnum ) \
76 FC_DECLARE_DERIVED_EXCEPTION( \
77 op_name ## _ ## exc_name, \
78 graphene::chain::op_name ## _evaluate_exception, \
79 3050000 + 100 * operation::tag< op_name ## _operation >::value \
83 #define GRAPHENE_IMPLEMENT_OP_EVALUATE_EXCEPTION( exc_name, op_name, seqnum, msg ) \
84 FC_IMPLEMENT_DERIVED_EXCEPTION( \
85 op_name ## _ ## exc_name, \
86 graphene::chain::op_name ## _evaluate_exception, \
87 3050000 + 100 * operation::tag< op_name ## _operation >::value \
92 #define GRAPHENE_TRY_NOTIFY( signal, ... ) \
95 signal( __VA_ARGS__ ); \
97 catch( const graphene::chain::plugin_exception& e ) \
99 elog( "Caught plugin exception: ${e}", ("e", e.to_detail_string() ) ); \
104 wlog( "Caught unexpected exception in plugin" ); \
107 namespace graphene {
namespace chain {
223 #define GRAPHENE_RECODE_EXC( cause_type, effect_type ) \
224 catch( const cause_type& e ) \
225 { throw( effect_type( e.what(), e.get_log() ) ); }