Skip to content

Commit

Permalink
Add alert to R side internal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed May 20, 2021
1 parent 8525f5a commit e417116
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,11 @@ split_lines <- function(x) {
}

stop_internal <- function(fn, msg) {
abort(sprintf("Internal error in `%s()`: %s", fn, msg))
abort(c(
sprintf("Internal error in `%s()`: %s", fn, msg),
"!" = "This error should be reported to the package authors."
))
}

stop_internal_c_lib <- function(fn, msg) {
msg <- c(
sprintf("Internal error in `%s()`: %s", fn, msg),
Expand Down

0 comments on commit e417116

Please sign in to comment.