rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros
exceptions.hpp File Reference

Exception classes header file. More...

#include <rad/helper.hpp>
#include <rad/logger.hpp>
#include <boost/filesystem.hpp>
#include <list>
#include <sstream>
#include <stdexcept>
#include <string>
#include <thread>

Go to the source code of this file.

Classes

class  rad::Exception
 
class  rad::RuntimeDbException
 
class  rad::InvalidOptionException
 

Namespaces

 rad
 
 rad::errorMsg
 

Macros

#define RAD_EXCEPTION_INFO(component, proc_name, version, severity, tag, text)
 
#define RAD_THROW(msg, component, proc_name, version, severity, tag)
 
#define RAD_RETHROW(exception, component, proc_name, version, severity, tag, text)
 

Detailed Description

Exception classes header file.

Author
landolfa

Macro Definition Documentation

#define RAD_EXCEPTION_INFO (   component,
  proc_name,
  version,
  severity,
  tag,
  text 
)
Value:
\
std::stringstream buf; \
buf << rad::GetTimestamp() << " " << boost::filesystem::path(__FILE__).filename().string() \
<< " " << __LINE__ << " " << __FUNCTION__ << " " << component << " " \
<< rad::Helper::GetHostname() << " " << proc_name << " " << std::hex \
<< std::this_thread::get_id() << " " << getpid() << std::dec << " " << version << " " \
<< severity << " " << tag << " " << text;
static std::string GetHostname(const bool with_domain=false)
Definition: helper.cpp:29
string version
Definition: conf.py:77
required float dec
Definition: exmalif.proto:15

Macros to throw exceptions with diagnostics.

Todo:
: fix conversions/formatting
#define RAD_RETHROW (   exception,
  component,
  proc_name,
  version,
  severity,
  tag,
  text 
)
Value:
RAD_EXCEPTION_INFO(component, proc_name, version, severity, tag, text) \
exception.AddDiagnostic(buf.str()); \
throw;
#define RAD_EXCEPTION_INFO(component, proc_name, version, severity, tag, text)
Definition: exceptions.hpp:110
string version
Definition: conf.py:77
#define RAD_THROW (   msg,
  component,
  proc_name,
  version,
  severity,
  tag 
)
Value:
RAD_EXCEPTION_INFO(component, proc_name, version, severity, tag, "") \
throw rad::Exception(msg, buf.str());
#define RAD_EXCEPTION_INFO(component, proc_name, version, severity, tag, text)
Definition: exceptions.hpp:110
string version
Definition: conf.py:77
Definition: exceptions.hpp:45