We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fde283d commit b058f9cCopy full SHA for b058f9c
inst/include/Rcpp/api/meat/Rcpp_eval.h
@@ -18,7 +18,7 @@
18
#ifndef Rcpp_api_meat_Rcpp_eval_h
19
#define Rcpp_api_meat_Rcpp_eval_h
20
21
-#include <R_ext/GraphicsEngine.h>
+#include <Rcpp/Interrupt.h>
22
23
namespace Rcpp{
24
@@ -71,11 +71,14 @@ namespace Rcpp{
71
EvalCall call;
72
call.expr_ = expr_;
73
call.env = env;
74
- R_ToplevelExec(Rcpp_eval, (void*)&call);
75
- if (!call.error_message.empty())
76
- throw eval_error(call.error_message);
77
- else
78
- return call.result;
+ if (R_ToplevelExec(Rcpp_eval, (void*)&call)) {
+ if (!call.error_message.empty())
+ throw eval_error(call.error_message);
+ else
+ return call.result;
79
+ } else {
80
+ throw internal::InterruptedException();
81
+ }
82
}
83
84
0 commit comments