Skip to content

Commit

Permalink
[R-package] use safer pattern for error formatting (fixes #6212) (#6216)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Nov 30, 2023
1 parent 2ee3ec8 commit 848e76c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R-package/src/lightgbm_R.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void LGBM_R_save_exception_msg(const std::string &err);
catch(std::exception& ex) { LGBM_R_save_exception_msg(ex); } \
catch(std::string& ex) { LGBM_R_save_exception_msg(ex); } \
catch(...) { Rf_error("unknown exception"); } \
Rf_error(R_errmsg_buffer); \
Rf_error("%s", R_errmsg_buffer); \
return R_NilValue; /* <- won't be reached */

#define CHECK_CALL(x) \
Expand Down

0 comments on commit 848e76c

Please sign in to comment.