forked from r-lib/cpp11
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.cpp
More file actions
20 lines (19 loc) · 747 Bytes
/
errors.cpp
File metadata and controls
20 lines (19 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "cpp11/function.hpp"
#include "cpp11/protect.hpp"
using namespace cpp11;
[[cpp11::register]] void my_stop_n1fmt(std::string mystring) { cpp11::stop(mystring); }
[[cpp11::register]] void my_stop_n2fmt(std::string mystring, std::string myarg) {
cpp11::stop(mystring, myarg.c_str());
}
[[cpp11::register]] void my_warning_n1fmt(std::string mystring) {
cpp11::warning(mystring);
}
[[cpp11::register]] void my_warning_n2fmt(std::string mystring, std::string myarg) {
cpp11::warning(mystring, myarg.c_str());
}
[[cpp11::register]] void my_message_n1fmt(std::string mystring) {
cpp11::message(mystring);
}
[[cpp11::register]] void my_message_n2fmt(std::string mystring, std::string myarg) {
cpp11::message(mystring, myarg.c_str());
}