ledger-core
Public Member Functions | Static Public Member Functions | List of all members
ledger::core::Try< T > Class Template Reference

Public Member Functions

 Try (const T &v)
 
 Try (api::ErrorCode code, const std::string &message)
 
void fail (api::ErrorCode code, const std::string &message)
 
void fail (const Exception &ex)
 
void success (const T &v)
 
const T & getValue () const
 
const ExceptiongetFailure () const
 
bool isFailure () const
 
bool isSuccess () const
 
bool isComplete () const
 
Option< T > toOption () const
 
Option< Exceptionexception () const
 
const T & getOrThrow () const
 
template<class U >
const T & getOrThrowException () const
 
Try< T > mapException (api::ErrorCode code)
 

Static Public Member Functions

static const Try< T > from (std::function< T()> lambda)
 

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