Skip to content

Commit

Permalink
Propagate the error causing rextendr::document() to fail (#409)
Browse files Browse the repository at this point in the history
* Propogate the error causing `rextendr::document()` to fail

* lintr?
  • Loading branch information
CGMossa authored Dec 16, 2024
1 parent 4217a0e commit 93b8bd5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/register_extendr.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ register_extendr <- function(path = ".", quiet = FALSE, force = FALSE, compile =
),
error = function(e) {
cli::cli_abort(
c("Failed to generate wrapper functions.", x = e[["message"]]),
c("Failed to generate wrapper functions.",
x = e[["message"]],
y = e[["parent"]][["message"]]
),
class = "rextendr_error"
)
}
Expand All @@ -118,7 +121,7 @@ register_extendr <- function(path = ".", quiet = FALSE, force = FALSE, compile =
#' @param package_name The name of the package.
#' @param outfile Determines where to write wrapper code.
#' @param path Path from which package root is looked up. Used for message formatting.
#' @param use_symbols Logical, indicating wether to add additonal symbol information to
#' @param use_symbols Logical, indicating wether to add additional symbol information to
#' the generated wrappers. Default (`FALSE`) is used when making wrappers for the package,
#' while `TRUE` is used to make wrappers for dynamically generated libraries using
#' [`rust_source`], [`rust_function`], etc.
Expand Down

0 comments on commit 93b8bd5

Please sign in to comment.