BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Types | Public Member Functions | List of all members
fc::unhandled_exception Class Reference

re-thrown whenever an unhandled exception is caught. More...

#include <exception.hpp>

Inheritance diagram for fc::unhandled_exception:
fc::exception

Public Types

enum  code_enum { code_value = unhandled_exception_code }
 
- Public Types inherited from fc::exception
enum  code_enum { code_value = unspecified_exception_code }
 

Public Member Functions

 unhandled_exception (log_message &&m, std::exception_ptr e=std::current_exception())
 
 unhandled_exception (log_messages)
 
 unhandled_exception (const exception &)
 
std::exception_ptr get_inner_exception () const
 
virtual void dynamic_rethrow_exception () const
 
virtual std::shared_ptr< exceptiondynamic_copy_exception () const
 
- Public Member Functions inherited from fc::exception
 exception (int64_t code=unspecified_exception_code, const std::string &name_value="exception", const std::string &what_value="unspecified")
 
 exception (log_message &&, int64_t code=unspecified_exception_code, const std::string &name_value="exception", const std::string &what_value="unspecified")
 
 exception (log_messages &&, int64_t code=unspecified_exception_code, const std::string &name_value="exception", const std::string &what_value="unspecified")
 
 exception (const log_messages &, int64_t code=unspecified_exception_code, const std::string &name_value="exception", const std::string &what_value="unspecified")
 
 exception (const exception &e)
 
 exception (exception &&e)
 
virtual ~exception ()
 
const char * name () const throw ()
 
int64_t code () const throw ()
 
virtual const char * what () const throw ()
 
const log_messagesget_log () const
 
void append_log (log_message m)
 
std::string to_detail_string (log_level ll=log_level::all) const
 
std::string to_string (log_level ll=log_level::info) const
 
exceptionoperator= (const exception &copy)
 
exceptionoperator= (exception &&copy)
 

Additional Inherited Members

- Protected Attributes inherited from fc::exception
std::unique_ptr< detail::exception_impl > my
 

Detailed Description

re-thrown whenever an unhandled exception is caught.

Any exceptions thrown by 3rd party libraries that are not caught get wrapped in an unhandled_exception exception.

The original exception is captured as a std::exception_ptr which may be rethrown. The std::exception_ptr does not propgate across process boundaries.

Definition at line 146 of file exception.hpp.

Member Enumeration Documentation

◆ code_enum

Enumerator
code_value 

Definition at line 149 of file exception.hpp.

Constructor & Destructor Documentation

◆ unhandled_exception() [1/3]

fc::unhandled_exception::unhandled_exception ( log_message &&  m,
std::exception_ptr  e = std::current_exception() 
)

Definition at line 84 of file exception.cpp.

◆ unhandled_exception() [2/3]

fc::unhandled_exception::unhandled_exception ( log_messages  m)

Definition at line 93 of file exception.cpp.

◆ unhandled_exception() [3/3]

fc::unhandled_exception::unhandled_exception ( const exception r)

Definition at line 89 of file exception.cpp.

Member Function Documentation

◆ dynamic_copy_exception()

std::shared_ptr< exception > fc::unhandled_exception::dynamic_copy_exception ( ) const
virtual

This is equivalent to:

try { throwAsDynamic_exception(); }
catch( ... ) { return std::current_exception(); }

Reimplemented from fc::exception.

Definition at line 105 of file exception.cpp.

◆ dynamic_rethrow_exception()

void fc::unhandled_exception::dynamic_rethrow_exception ( ) const
virtual

Throw this exception as its most derived type.

Note
does not return.

Rethrows the exception restoring the proper type based upon the error code. This is used to propagate exception types across conversions to/from JSON

Reimplemented from fc::exception.

Definition at line 99 of file exception.cpp.

◆ get_inner_exception()

std::exception_ptr fc::unhandled_exception::get_inner_exception ( ) const

Definition at line 97 of file exception.cpp.


The documentation for this class was generated from the following files: