Classes | Defines

bulkDataNTGenEx.h File Reference

#include <string>
#include "acserrC.h"
Include dependency graph for bulkDataNTGenEx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BDNTEx
class  BDNTCompletion< T >

Defines

#define BDNT_EX(ex, format,...)
#define BDNT_EX_THROW_EX(format,...)
#define BDNT_EX_CATCH_AND_LOG(call, format,...)

Define Documentation

#define BDNT_EX (   ex,
  format,
  ... 
)
Value:
do {                                                                \
        char dummy[256];                                                \
        snprintf(dummy, 255, format, ##__VA_ARGS__);                    \
        ex = BDNTEx(std::string(dummy), std::string(__FILE__), __LINE__); \
    }while(0)
#define BDNT_EX_CATCH_AND_LOG (   call,
  format,
  ... 
)
Value:
do {                                                                \
    try                                                                 \
    {                                                                   \
        call;                                                           \
    }                                                                   \
    catch ( BDNTEx &ex )                                                \
    {                                                                   \
        char dummy[256];                                                \
        snprintf(dummy, 255, format, ##__VA_ARGS__);                    \
        ACS_SHORT_LOG((LM_ERROR, "%s", ex.asString().c_str()));         \
        ACS_SHORT_LOG((LM_ERROR, "%s", dummy));                         \
    }                                                                   \
    catch ( ... )                                                       \
    {                                                                   \
        char dummy[256];                                                \
        snprintf(dummy, 255, format, ##__VA_ARGS__);                    \
        ACS_SHORT_LOG((LM_ERROR, "unknown exception on " #call));       \
        ACS_SHORT_LOG((LM_ERROR, "%s", dummy));                         \
    }                                                                   \
    } while(0)
#define BDNT_EX_THROW_EX (   format,
  ... 
)
Value:
do {                                                                \
        char dummy[256];                                                \
        snprintf(dummy, 255, format, ##__VA_ARGS__);                    \
        throw BDNTEx(std::string(dummy), std::string(__FILE__), __LINE__); \
    }while(0)