Rcpp Version 0.12.12
exceptions.h File Reference
Include dependency graph for exceptions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Rcpp::exception
 
class  Rcpp::no_such_env
 
class  Rcpp::file_io_error
 
class  Rcpp::file_not_found
 
class  Rcpp::file_exists
 

Namespaces

 Rcpp
 Rcpp API.
 
 Rcpp::internal
 internal implementation details
 

Macros

#define GET_STACKTRACE()   stack_trace( __FILE__, __LINE__ )
 
#define RCPP_EXCEPTION_CLASS(__CLASS__, __WHAT__)
 
#define RCPP_SIMPLE_EXCEPTION_CLASS(__CLASS__, __MESSAGE__)
 
#define DEMANGLE(__TYPE__)   demangle( typeid(__TYPE__).name() ).c_str()
 

Functions

static std::string Rcpp::toString (const int i)
 
void Rcpp::warning (const std::string &message)
 
void NORET Rcpp::stop (const std::string &message)
 
 Rcpp::RCPP_SIMPLE_EXCEPTION_CLASS (not_a_matrix,"Not a matrix.") RCPP_SIMPLE_EXCEPTION_CLASS(no_such_field
 
No such field Rcpp::RCPP_EXCEPTION_CLASS (reference_creation_error,"Error creating object of reference class") RCPP_EXCEPTION_CLASS(eval_error
 
SEXP Rcpp::internal::nth (SEXP s, int n)
 
bool Rcpp::internal::is_Rcpp_eval_call (SEXP expr)
 
SEXP get_last_call ()
 
SEXP get_exception_classes (const std::string &ex_class)
 
SEXP make_condition (const std::string &ex_msg, SEXP call, SEXP cppstack, SEXP classes)
 
SEXP rcpp_exception_to_r_condition (const Rcpp::exception &ex)
 
SEXP exception_to_r_condition (const std::exception &ex)
 
SEXP string_to_try_error (const std::string &str)
 
SEXP exception_to_try_error (const std::exception &ex)
 
std::string demangle (const std::string &name)
 
void forward_exception_to_r (const std::exception &ex)
 
void forward_rcpp_exception_to_r (const Rcpp::exception &ex)
 

Macro Definition Documentation

#define GET_STACKTRACE ( )    stack_trace( __FILE__, __LINE__ )

Definition at line 25 of file exceptions.h.

#define RCPP_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 + "." ){} ; \
virtual ~__CLASS__() throw(){} ; \
virtual const char* what() const throw() { return message.c_str() ; } \
private: \
std::string message ; \
} ;
Definition: swap.h:25

Definition at line 125 of file exceptions.h.

#define RCPP_SIMPLE_EXCEPTION_CLASS (   __CLASS__,
  __MESSAGE__ 
)
Value:
class __CLASS__ : public std::exception{ \
public: \
__CLASS__() throw() {} ; \
virtual ~__CLASS__() throw(){} ; \
virtual const char* what() const throw() { return __MESSAGE__ ; } \
} ;

Definition at line 137 of file exceptions.h.

Function Documentation

std::string demangle ( const std::string &  name)
inline
SEXP exception_to_r_condition ( const std::exception &  ex)
inline

Definition at line 278 of file exceptions.h.

References demangle(), get_exception_classes(), get_last_call(), make_condition(), rcpp_get_stack_trace(), and rcpp_set_stack_trace().

Referenced by forward_exception_to_r(), and forward_rcpp_exception_to_r().

Here is the call graph for this function:

SEXP exception_to_try_error ( const std::exception &  ex)
inline

Definition at line 310 of file exceptions.h.

References demangle(), and string_to_try_error().

Here is the call graph for this function:

void forward_exception_to_r ( const std::exception &  ex)
inline

Definition at line 317 of file exceptions.h.

References exception_to_r_condition().

Here is the call graph for this function:

void forward_rcpp_exception_to_r ( const Rcpp::exception ex)
inline

Definition at line 324 of file exceptions.h.

References exception_to_r_condition().

Here is the call graph for this function:

SEXP get_exception_classes ( const std::string &  ex_class)
inline

Definition at line 225 of file exceptions.h.

Referenced by exception_to_r_condition(), and rcpp_exception_to_r_condition().

SEXP get_last_call ( )
inline

Definition at line 205 of file exceptions.h.

References Rcpp::internal::is_Rcpp_eval_call(), and Rcpp::Rcpp_eval().

Referenced by exception_to_r_condition(), and rcpp_exception_to_r_condition().

Here is the call graph for this function:

SEXP make_condition ( const std::string &  ex_msg,
SEXP  call,
SEXP  cppstack,
SEXP  classes 
)
inline

Definition at line 239 of file exceptions.h.

Referenced by exception_to_r_condition(), and rcpp_exception_to_r_condition().

SEXP rcpp_exception_to_r_condition ( const Rcpp::exception ex)
inline
SEXP string_to_try_error ( const std::string &  str)
inline

Definition at line 290 of file exceptions.h.

Referenced by exception_to_try_error().