proxygen
folly::exception_wrapper::SharedPtr::Impl< Ex > Struct Template Referencefinal

#include <ExceptionWrapper.h>

Inheritance diagram for folly::exception_wrapper::SharedPtr::Impl< Ex >:
folly::exception_wrapper::SharedPtr::Base

Public Member Functions

 Impl ()=default
 
template<typename... As>
 Impl (As &&...as)
 
void throw_ () const override
 
std::exception const * get_exception_ () const noexceptoverride
 
exception_wrapper get_exception_ptr_ () const noexceptoverride
 
- Public Member Functions inherited from folly::exception_wrapper::SharedPtr::Base
 Base ()=default
 
 Base (std::type_info const &info)
 
virtual ~Base ()
 

Public Attributes

Ex ex_
 
- Public Attributes inherited from folly::exception_wrapper::SharedPtr::Base
std::type_info const * info_
 

Detailed Description

template<class Ex>
struct folly::exception_wrapper::SharedPtr::Impl< Ex >

Definition at line 313 of file ExceptionWrapper.h.

Constructor & Destructor Documentation

template<class Ex >
folly::exception_wrapper::SharedPtr::Impl< Ex >::Impl ( )
default
template<class Ex >
template<typename... As>
folly::exception_wrapper::SharedPtr::Impl< Ex >::Impl ( As &&...  as)
inlineexplicit

Definition at line 319 of file ExceptionWrapper.h.

References folly::gen::as(), and folly::pushmi::__adl::noexcept().

320  : Base{typeid(Ex)}, ex_(std::forward<As>(as)...) {}
Collect as()
Definition: Base.h:811

Member Function Documentation

template<class Ex >
std::exception const * folly::exception_wrapper::SharedPtr::Impl< Ex >::get_exception_ ( ) const
inlineoverridevirtualnoexcept

Implements folly::exception_wrapper::SharedPtr::Base.

Definition at line 233 of file ExceptionWrapper-inl.h.

References folly::exception_wrapper::as_exception_or_null_().

233  {
234  return as_exception_or_null_(ex_);
235 }
static std::exception const * as_exception_or_null_(std::exception const &ex)
template<class Ex >
exception_wrapper folly::exception_wrapper::SharedPtr::Impl< Ex >::get_exception_ptr_ ( ) const
inlineoverridevirtualnoexcept

Implements folly::exception_wrapper::SharedPtr::Base.

Definition at line 238 of file ExceptionWrapper-inl.h.

238  {
239  try {
240  throw_();
241  } catch (Ex& ex) {
242  return exception_wrapper{std::current_exception(), ex};
243  }
244 }
template<class Ex >
void folly::exception_wrapper::SharedPtr::Impl< Ex >::throw_ ( ) const
inlineoverridevirtual

Implements folly::exception_wrapper::SharedPtr::Base.

Definition at line 227 of file ExceptionWrapper-inl.h.

228  {
229  throw ex_; // @nolint
230 }

Member Data Documentation

template<class Ex >
Ex folly::exception_wrapper::SharedPtr::Impl< Ex >::ex_

Definition at line 314 of file ExceptionWrapper.h.


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