JANA2
JException Struct Reference

JException is a data object which attaches JANA-specific context information to a generic exception. More...

#include <JException.h>

Inheritance diagram for JException:
Collaboration diagram for JException:

Public Member Functions

 JException (std::string message="Unknown exception")
 Basic constructor.
 
template<typename... Args>
 JException (std::string message, Args...args)
 Constructor with printf-style formatting. More...
 
std::string GetMessage ()
 
const char * what () const noexcept
 

Public Attributes

std::string message
 
std::string plugin_name
 
std::string component_name
 
std::string factory_name
 
std::string factory_tag
 
std::string stacktrace
 
std::exception_ptr nested_exception
 

Friends

std::ostream & operator<< (std::ostream &os, JException const &ex)
 Convenience method for formatting complete error data.
 

Detailed Description

JException is a data object which attaches JANA-specific context information to a generic exception.

As it unwinds the call stack, different exception handlers may add or change information as they see fit. It does not use getters and setters, because they are not needed, because there is no invariant.

Constructor & Destructor Documentation

template<typename... Args>
JException::JException ( std::string  format_str,
Args...  args 
)
explicit

Constructor with printf-style formatting.

Constructor with convenient printf-style formatting.

Uses variadic templates (although it is slightly overkill) because variadic functions are frowned on now.


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