Chi-Tech
chi_log_exceptions.h File Reference
#include <string>
#include <stdexcept>

Go to the source code of this file.

Macros

#define ChiInvalidArgumentIf(condition, message)
 
#define ChiInvalidArgument(message)
 
#define ChiLogicalErrorIf(condition, message)
 
#define ChiLogicalError(message)    throw std::logic_error(std::string(__PRETTY_FUNCTION__) + ": " + message)
 
#define ChiRecoverableInvalidArgument(condition, message)
 
#define ChiRecoverableLogicalError(condition, message)
 

Macro Definition Documentation

◆ ChiInvalidArgument

#define ChiInvalidArgument (   message)
Value:
throw std::invalid_argument(std::string(__PRETTY_FUNCTION__) + ": " + \
message)

Definition at line 11 of file chi_log_exceptions.h.

◆ ChiInvalidArgumentIf

#define ChiInvalidArgumentIf (   condition,
  message 
)
Value:
if (condition) \
throw std::invalid_argument(std::string(__PRETTY_FUNCTION__) + ": " + \
message)

Definition at line 7 of file chi_log_exceptions.h.

◆ ChiLogicalError

#define ChiLogicalError (   message)     throw std::logic_error(std::string(__PRETTY_FUNCTION__) + ": " + message)

Definition at line 19 of file chi_log_exceptions.h.

◆ ChiLogicalErrorIf

#define ChiLogicalErrorIf (   condition,
  message 
)
Value:
if (condition) \
throw std::logic_error(std::string(__PRETTY_FUNCTION__) + ": " + message)

Definition at line 15 of file chi_log_exceptions.h.

◆ ChiRecoverableInvalidArgument

#define ChiRecoverableInvalidArgument (   condition,
  message 
)
Value:
{ \
if (condition) \
throw std::RecoverableException( \
std::string("Recoverable Invalid Argument: "), \
std::string(__PRETTY_FUNCTION__) + ": " + #message); \
}

Definition at line 22 of file chi_log_exceptions.h.

◆ ChiRecoverableLogicalError

#define ChiRecoverableLogicalError (   condition,
  message 
)
Value:
{ \
if (condition) \
throw std::RecoverableException(std::string("Recoverable Logic Error: ") \
std::string(__PRETTY_FUNCTION__) + \
": " + #message); \
}

Definition at line 30 of file chi_log_exceptions.h.