Classes | Namespaces | Defines | Functions
exception.h File Reference
#include <boost/format.hpp>
#include <stdexcept>
#include <string>
#include <vector>
#include "errors.h"
Include dependency graph for exception.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Common::Error
struct  Common::ErrorData

Namespaces

namespace  Common
 

Addon interface definition GNU LGPL.


Defines

#define BEGIN_TRY_BLOCK   try{
#define CREATE_COMMON_ERROR(code, message)   Common::CreateError(__LINE__, __FILE__, code, message)
#define CREATE_ERROR(data)   ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage)
#define CREATE_ERROR1(data, param1)   (::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1))
 Last parameter can be any type (is a format message parameter) or sub error.
#define CREATE_ERROR2(data, param1, param2)   ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1, param2)
#define CREATE_ERROR3(data, param1, param2, param3)   ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1, param2, param3)
#define CREATE_ERROR4(data, param1, param2, param3, param4)   ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1, param2, param3, param4)
#define END_TRY_BLOCK(handler)
#define ERROR_CODE(module_id, code)   (module_id << 16 | (code & 8))
#define THROW_COMMON_ERROR(code, message)   throw ::Common::CreateError(__LINE__, __FILE__, code, message)
#define THROW_ERROR(data)   throw ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage)
#define THROW_ERROR1(data, param1)   throw CREATE_ERROR1(data, param1);
#define THROW_ERROR2(data, param1, param2)   throw CREATE_ERROR2(data, param1, param2)
#define THROW_ERROR3(data, param1, param2, param3)   throw CREATE_ERROR3(data, param1, param2, param3)
#define THROW_ERROR4(data, param1, param2, param3, param4)   throw CREATE_ERROR4(data, param1, param2, param3, param4)
#define THROW_OS_ERROR(UserMsg)   (throw ::Common::CreateError(__LINE__, __FILE__, errno, "%1% %2%.", UserMsg, strerror(errno)))

Functions

Error Common::CreateError (unsigned lineNum, const char *filename, unsigned errorCode, const char *msg)
template<typename T1 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1)
template<typename T1 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const Common::Error &subError)
template<typename T1 , typename T2 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const T2 &param2)
template<typename T1 , typename T2 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const T2 &param2, const Common::Error &subError)
template<typename T1 , typename T2 , typename T3 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const T2 &param2, const T3 &param3)
template<typename T1 , typename T2 , typename T3 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const T2 &param2, const T3 &param3, const Common::Error &subError)
template<typename T1 , typename T2 , typename T3 , typename T4 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const T2 &param2, const T3 &param3, const T4 &param4)
template<typename T1 , typename T2 , typename T3 , typename T4 >
Error Common::CreateError (unsigned lineNum, const char *fileName, unsigned errorCode, const char *msg, const T1 &param1, const T2 &param2, const T3 &param3, const T4 &param4, const Common::Error &subError)

Define Documentation

#define BEGIN_TRY_BLOCK   try{

Definition at line 228 of file exception.h.

#define CREATE_COMMON_ERROR (   code,
  message 
)    Common::CreateError(__LINE__, __FILE__, code, message)

Definition at line 206 of file exception.h.

#define CREATE_ERROR (   data)    ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage)

Definition at line 208 of file exception.h.

#define CREATE_ERROR1 (   data,
  param1 
)    (::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1))

Last parameter can be any type (is a format message parameter) or sub error.

Definition at line 211 of file exception.h.

#define CREATE_ERROR2 (   data,
  param1,
  param2 
)    ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1, param2)

Definition at line 214 of file exception.h.

#define CREATE_ERROR3 (   data,
  param1,
  param2,
  param3 
)    ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1, param2, param3)

Definition at line 217 of file exception.h.

#define CREATE_ERROR4 (   data,
  param1,
  param2,
  param3,
  param4 
)    ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage, param1, param2, param3, param4)

Definition at line 220 of file exception.h.

#define END_TRY_BLOCK (   handler)
Value:
}\
catch (const ::Common::Error& err)\
{\
  return handler(err);\
}\
catch (const std::exception& exc)\
{\
  return handler(CREATE_ERROR1(StdException, exc.what()));\
}

Definition at line 229 of file exception.h.

#define ERROR_CODE (   module_id,
  code 
)    (module_id << 16 | (code & 8))

Definition at line 203 of file exception.h.

#define THROW_COMMON_ERROR (   code,
  message 
)    throw ::Common::CreateError(__LINE__, __FILE__, code, message)

Definition at line 205 of file exception.h.

#define THROW_ERROR (   data)    throw ::Common::CreateError(__LINE__, __FILE__, data.ErrorCode, data.ErrorMessage)

Definition at line 207 of file exception.h.

#define THROW_ERROR1 (   data,
  param1 
)    throw CREATE_ERROR1(data, param1);

Definition at line 212 of file exception.h.

#define THROW_ERROR2 (   data,
  param1,
  param2 
)    throw CREATE_ERROR2(data, param1, param2)

Definition at line 215 of file exception.h.

#define THROW_ERROR3 (   data,
  param1,
  param2,
  param3 
)    throw CREATE_ERROR3(data, param1, param2, param3)

Definition at line 218 of file exception.h.

#define THROW_ERROR4 (   data,
  param1,
  param2,
  param3,
  param4 
)    throw CREATE_ERROR4(data, param1, param2, param3, param4)

Definition at line 221 of file exception.h.

#define THROW_OS_ERROR (   UserMsg)    (throw ::Common::CreateError(__LINE__, __FILE__, errno, "%1% %2%.", UserMsg, strerror(errno)))

Definition at line 226 of file exception.h.



ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Sat Jun 8 2019 18:24:58