Skip to content

Could Rcpp::stop() get include_call = true as an argument? #965

Closed
@DavisVaughan

Description

@DavisVaughan

I see how Rcpp::stop() works here

inline void NORET stop(const char* fmt, const T1& arg1) {

Would it be possible to add bool include_call = true to the end of each template implementation and pass that on to Rcpp::exception()? Would that be a non-invasive change?

I see I could set RCPP_DEFAULT_INCLUDE_CALL but I don't think I love that idea.

explicit exception(const char* message_, bool include_call = RCPP_DEFAULT_INCLUDE_CALL) : // #nocov start

I could also make my own stop() on top of Rcpp::exception() but I'd hate to have to copy/paste all that boilerplate from Rcpp::stop(), and appreciate that it already formats string input for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions