22#ifndef Rcpp__exceptionscpp11__h
23#define Rcpp__exceptionscpp11__h
30#define RCPP_ADVANCED_EXCEPTION_CLASS(__CLASS__, __WHAT__) \
31class __CLASS__ : public std::exception { \
33 __CLASS__( ) throw() : message( std::string(__WHAT__) + "." ){} \
34 __CLASS__( const std::string& message ) throw() : \
35 message( std::string(__WHAT__) + ": " + message + "."){} \
36 template <typename... Args> \
37 __CLASS__( const char* fmt, Args&&... args ) throw() : \
38 message( tfm::format(fmt, std::forward<Args>(args)... ) ){} \
39 virtual ~__CLASS__() throw(){} \
40 virtual const char* what() const throw() { return message.c_str(); } \
42 std::string message; \
45template <
typename...
Args>
50template <
typename...
Args>
void NORET stop(const std::string &message)
void warning(const std::string &message)