ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Variables
Exceptions.hpp File Reference

Exception classes header file. More...

#include <rad/Helper.hpp>
#include <boost/filesystem.hpp>
#include <stdexcept>
#include <string>
#include <list>
#include <sstream>
#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)
 

Variables

const char *const rad::ErrorMsg::DB_API_NULL = "DB API returned NULL"
 
const char *const rad::ErrorMsg::DB_REPLY_ERR = "Received error reply from DB"
 
const char *const rad::ErrorMsg::DB_CONTEXT_ERR = "DB Context error"
 
const char *const rad::ErrorMsg::MSG_CONTEXT_ERR = "Error creating msg context"
 
const char *const rad::ErrorMsg::MSG_SOCKET_ERR = "Error creating socket"
 
const char *const rad::ErrorMsg::MSG_CONNECT_ERR = "Error connecting socket"
 
const char *const rad::ErrorMsg::MSG_BIND_ERR = "Error binding socket"
 
const char *const rad::ErrorMsg::MSG_CONFIG_ERR = "Error configuring socket"
 
const char *const rad::ErrorMsg::CFG_LOAD = "Loading configuration file"
 
const char *const rad::ErrorMsg::OPT_INVALID = "Invalid command line option"
 

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;
string version
Definition: conf.py:61
#define component
Definition: clipm_test_priv_image_edge_operations.c:75
static std::string GetHostname(const bool withDomain=false)
Definition: Helper.cpp:29

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:119
string version
Definition: conf.py:61
#define component
Definition: clipm_test_priv_image_edge_operations.c:75
#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:119
string version
Definition: conf.py:61
optional string msg
Definition: topics.proto:7
#define component
Definition: clipm_test_priv_image_edge_operations.c:75
Definition: Exceptions.hpp:44