bux API Reference 1.9.0
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Loading...
Searching...
No Matches
XException.h File Reference
#include "XPlatform.h"
#include <format>
#include <stdexcept>
Include dependency graph for XException.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bux
 THE common namespace of bux library.
 

Macros

#define THROW_AS(exp_class, fmtStr, ...)
 
#define RAW_THROW_AS(exp_class, fmtStr, ...)
 
#define THROW_CLASS(exp_class)
 
#define LOGIC_ERROR(fmtStr, ...)
 Wrap FILE(DATE)#__LINE__ FUNCTION: msg into std::logic_error.
 
#define RUNTIME_ERROR(fmtStr, ...)
 Wrap FILE(DATE)#__LINE__ FUNCTION: msg into std::runtime_error.
 
#define RAW_LOGIC_ERROR(fmtStr, ...)
 
#define RAW_RUNTIME_ERROR(fmtStr, ...)
 

Macro Definition Documentation

◆ LOGIC_ERROR

#define LOGIC_ERROR ( fmtStr,
... )
Value:
THROW_AS(std::logic_error, fmtStr, ##__VA_ARGS__)
#define THROW_AS(exp_class, fmtStr,...)
Definition XException.h:22

Wrap FILE(DATE)#__LINE__ FUNCTION: msg into std::logic_error.

Definition at line 29 of file XException.h.

◆ RAW_LOGIC_ERROR

#define RAW_LOGIC_ERROR ( fmtStr,
... )
Value:
RAW_THROW_AS(std::logic_error, fmtStr, ##__VA_ARGS__)
#define RAW_THROW_AS(exp_class, fmtStr,...)
Definition XException.h:24

Definition at line 36 of file XException.h.

◆ RAW_RUNTIME_ERROR

#define RAW_RUNTIME_ERROR ( fmtStr,
... )
Value:
RAW_THROW_AS(std::runtime_error, fmtStr, ##__VA_ARGS__)

Definition at line 37 of file XException.h.

◆ RAW_THROW_AS

#define RAW_THROW_AS ( exp_class,
fmtStr,
... )
Value:
throw exp_class(std::format(fmtStr, ##__VA_ARGS__))

Definition at line 24 of file XException.h.

◆ RUNTIME_ERROR

◆ THROW_AS

#define THROW_AS ( exp_class,
fmtStr,
... )
Value:
throw exp_class(std::format(__FILE__ "(" __DATE__ ")#{} {}: " fmtStr, __LINE__, CUR_FUNC_, ##__VA_ARGS__))
#define CUR_FUNC_
Definition XPlatform.h:9

Definition at line 22 of file XException.h.

Referenced by bux::easy_unescape().

◆ THROW_CLASS

#define THROW_CLASS ( exp_class)
Value:
throw exp_class(std::format(__FILE__ "(" __DATE__ ")#{} {}: ", __LINE__, CUR_FUNC_))

Definition at line 26 of file XException.h.