μHAL (v2.7.9)
Part of the IPbus software repository
Classes | Namespaces | Macros
exception.hpp File Reference
#include <exception>
#include <string>
#include <sys/time.h>
Include dependency graph for exception.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  uhal::exception::exception
 An abstract base exception class, including an interface to throw as the derived type (for passing exceptions between threads) More...
 

Namespaces

 uhal
 
 uhal::exception
 A namespace for all exceptions to live in - this will hopefully make documentation a bit clearer.
 

Macros

#define UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, BaseClassName, ClassDescription)
 Macro for simplifying the declaration and definition of derived exception types. More...
 
#define UHAL_DEFINE_EXCEPTION_CLASS(ClassName, ClassDescription)   UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, uhal::exception::exception, ClassDescription)
 

Detailed Description

Author
Andrew W. Rose
Date
2012

Definition in file exception.hpp.

Macro Definition Documentation

◆ UHAL_DEFINE_DERIVED_EXCEPTION_CLASS

#define UHAL_DEFINE_DERIVED_EXCEPTION_CLASS (   ClassName,
  BaseClassName,
  ClassDescription 
)
Value:
class ClassName : public BaseClassName {\
public:\
ClassName() : BaseClassName() {}\
ClassName(const std::string& aMessage) : BaseClassName() {append(aMessage.c_str());}\
void throwAsDerivedType(){ throw ClassName(*this); } \
protected:\
std::string description() const throw() { return std::string( ClassDescription ); } \
};

Macro for simplifying the declaration and definition of derived exception types.

Definition at line 50 of file exception.hpp.

◆ UHAL_DEFINE_EXCEPTION_CLASS

#define UHAL_DEFINE_EXCEPTION_CLASS (   ClassName,
  ClassDescription 
)    UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, uhal::exception::exception, ClassDescription)

Definition at line 60 of file exception.hpp.

setupTemplate.description
description
Definition: setupTemplate.py:34