BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
9 #include <boost/exception/all.hpp>
21 _active_context(nullptr),
23 _task_specific_data(nullptr),
24 _promise_impl(nullptr),
35 } __except (get_unhandled_structured_exception_filter() ? get_unhandled_structured_exception_filter()(GetExceptionCode(), GetExceptionInformation()) : EXCEPTION_CONTINUE_SEARCH) {
49 FC_THROW_EXCEPTION( canceled_exception,
"task ${description} canceled before starting, reason ${reason}",
60 set_exception( std::make_shared<unhandled_exception>(
FC_LOG_MESSAGE( warn,
"unhandled exception: ${diagnostic}", (
"diagnostic",boost::current_exception_diagnostic_information()) ) ) );
88 {
synchronized( *_spinlock )
99 iter->cleanup(iter->value);
106 if( _retain_count.fetch_add(1, boost::memory_order_relaxed) == 0 )
107 _self = shared_from_this();
110 if( _retain_count.fetch_sub(1, boost::memory_order_release) == 1 )
context * _active_context
const char * _cancellation_reason
fc::context * next_blocked_mutex
Used to generate a useful error report when an exception is thrown.
virtual void cancel(const char *reason FC_CANCELATION_REASON_DEFAULT_ARG)
virtual void cancel(const char *reason FC_CANCELATION_REASON_DEFAULT_ARG) override
void cleanup_task_specific_data()
void _set_active_context(context *)
const char * get_desc() const
virtual std::shared_ptr< exception > dynamic_copy_exception() const
void(* _destroy_functor)(void *)
const char * cancellation_reason
Defines exception's used by fc.
void set_exception(const fc::exception_ptr &e)
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
void(* _run_functor)(void *, void *)
std::vector< detail::specific_data_info > * _task_specific_data
#define FC_LOG_MESSAGE(LOG_LEVEL, FORMAT,...)
A helper method for generating log messages.