From 3a46f3530555f59e7478820de386559d0bcc2e89 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:32:20 +0100 Subject: [PATCH] simplify error path --- src/fd.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/fd.cpp b/src/fd.cpp index cb0810b..fe3fda2 100644 --- a/src/fd.cpp +++ b/src/fd.cpp @@ -201,11 +201,7 @@ Rcpp::RObject execLater_fd(Rcpp::Function callback, Rcpp::IntegerVector readfds, tct_thrd_t thr; if (tct_thrd_create(&thr, &wait_thread, static_cast(argsptr.release())) != tct_thrd_success) -#ifdef _WIN32 - Rcpp::stop("Thread creation error: " + std::to_string(GetLastError())); -#else - Rcpp::stop("Thread creation error: " + std::string(strerror(errno))); -#endif + Rcpp::stop("Thread creation failed"); tct_thrd_detach(thr); Rcpp::XPtr>> xptr(new std::shared_ptr>(flag), true);