Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
print whole error if message could not be extracted
Browse files Browse the repository at this point in the history
Felixmil committed Sep 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent ab86cd2 commit 7caa968
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/snapshots.R
Original file line number Diff line number Diff line change
@@ -143,6 +143,10 @@ convertSnapshot <- function(..., format, output = ".", runSimulations = FALSE) {
},
error = function(e) {
message <- stringr::str_extract(as.character(e), "(?<=Message: )[^\\n]*")

if (is.na(message){
message <- e
})

cli::cli_abort(message = message, call = rlang::caller_env(n = 4))
}

0 comments on commit 7caa968

Please sign in to comment.