Rcpp Version 1.0.9
exceptions.h File Reference
#include <utility>
Include dependency graph for exceptions.h:

Go to the source code of this file.

Namespaces

 Rcpp
 Rcpp API.
 

Macros

#define RCPP_ADVANCED_EXCEPTION_CLASS(__CLASS__, __WHAT__)
 

Functions

template<typename... Args>
void Rcpp::warning (const char *fmt, Args &&... args)
 
template<typename... Args>
void NORET Rcpp::stop (const char *fmt, Args &&... args)
 

Macro Definition Documentation

◆ RCPP_ADVANCED_EXCEPTION_CLASS

#define RCPP_ADVANCED_EXCEPTION_CLASS (   __CLASS__,
  __WHAT__ 
)
Value:
class __CLASS__ : public std::exception { \
public: \
__CLASS__( ) throw() : message( std::string(__WHAT__) + "." ){} \
__CLASS__( const std::string& message ) throw() : \
message( std::string(__WHAT__) + ": " + message + "."){} \
template <typename... Args> \
__CLASS__( const char* fmt, Args&&... args ) throw() : \
message( tfm::format(fmt, std::forward<Args>(args)... ) ){} \
virtual ~__CLASS__() throw(){} \
virtual const char* what() const throw() { return message.c_str(); } \
private: \
std::string message; \
};
void message(SEXP s)
Definition: message.h:26
Definition: swap.h:25
void format(std::ostream &out, const char *fmt)
Definition: tinyformat.h:996

Definition at line 30 of file exceptions.h.