| 
    DynExp
    
   Highly flexible laboratory automation for dynamically changing experiments. 
   | 
 
Wrapper holding a pointer to an exception and providing functionality for accessing it. Used to transfer exceptions between an instrument's task and the ModuleBase module enqueuing the task. Refer to TaskBase::CallbackType.  
 More...
#include <Instrument.h>
Public Member Functions | |
| ExceptionContainer (const std::exception_ptr &Exception=nullptr) noexcept | |
Constructs an ExceptionContainer instance.   | |
| void | Throw () const | 
| Throws the stored exception. Doesn't do anything if there isn't a stored exception.   | |
| bool | IsError () const | 
| Checks whether the wrapper holds an exception.   | |
| auto | GetException () const | 
| Getter for Exception.   | |
| void | ClearError () | 
| Removes the stored exception. If this method is called by a task's CallbackFunc in case of an exception having ocurred while running the task, the exception is considered handled. In this case, no exception leaves TaskBase::Run().   | |
Private Attributes | |
| std::exception_ptr | Exception | 
| Exception stored in the wrapper.   | |
Wrapper holding a pointer to an exception and providing functionality for accessing it. Used to transfer exceptions between an instrument's task and the ModuleBase module enqueuing the task. Refer to TaskBase::CallbackType. 
Definition at line 85 of file Instrument.h.
      
  | 
  inlinenoexcept | 
Constructs an ExceptionContainer instance. 
| Exception | Pointer to an exception to store in the wrapper | 
Definition at line 92 of file Instrument.h.
      
  | 
  inline | 
Removes the stored exception. If this method is called by a task's CallbackFunc in case of an exception having ocurred while running the task, the exception is considered handled. In this case, no exception leaves TaskBase::Run().
Definition at line 117 of file Instrument.h.
      
  | 
  inline | 
      
  | 
  inline | 
Checks whether the wrapper holds an exception.
Definition at line 104 of file Instrument.h.
      
  | 
  inline | 
Throws the stored exception. Doesn't do anything if there isn't a stored exception.
Definition at line 98 of file Instrument.h.
      
  | 
  private | 
Exception stored in the wrapper.
Definition at line 120 of file Instrument.h.