We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4043ada commit 6d6f1dbCopy full SHA for 6d6f1db
inst/hooks/exported/parsable-roxygen.R
@@ -2,21 +2,20 @@
2
files <- commandArgs(trailing = TRUE)
3
4
out <- lapply(files, function(path) {
5
-
6
tryCatch(
7
# Capture any messages from roxygen2:::warn_roxy()
8
msg <- capture.output(
9
roxygen2::parse_file(path, env = NULL),
10
type = "message"
11
),
12
+
13
# In case we encounter a more general file parsing problem
14
error = function(e) {
15
cat(c("File ", path, " is not parsable. Full context:\n"))
16
stop(conditionMessage(e), call. = FALSE)
17
}
18
)
19
20
if (length(msg) > 0) {
21
cat(c("Roxygen commentary in file ", path, " is not parsable. Full context:\n"))
22
stop(paste0(msg, collapse = "\n"), call. = FALSE)
0 commit comments