Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting NA object does not provide useful error message #194

Closed
1beb opened this issue Feb 13, 2014 · 0 comments
Closed

Documenting NA object does not provide useful error message #194

1beb opened this issue Feb 13, 2014 · 0 comments

Comments

@1beb
Copy link

@1beb 1beb commented Feb 13, 2014

While documenting a package, I accidentally typed NA instead of NULL at the end of the roxygen block.

It was challenging to find my error, especially when using Build and Reload within RStudio (becuase there's no traceback)

Error: is.call(call) is not TRUE

Trying to roxygenize in the console allowed me to get the results of a traceback():

11: stop(sprintf(ngettext(length(r), "%s is not TRUE", "%s are not all TRUE"), 
        ch), call. = FALSE, domain = NA)
10: stopifnot(is.call(call))
9: standardise_call(call, env)
8: object_from_call(call, env, preref)
7: (function (call, ref, comment_ref) 
   {
       preref <- parse.preref(as.character(comment_ref))
       if (is.null(preref)) 
           return()
       preref$object <- object_from_call(call, env, preref)
       preref$srcref <- list(filename = file, lloc = as.vector(ref))
       add_defaults(preref)
   })(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]])
6: mapply(FUN = f, ..., SIMPLIFY = FALSE)
5: Map(extract, parsed, refs, comment_refs)
4: FUN(c("/home/path/to/package/file1.r", 
   "/home/path/to/package/file2.r", 
   .... # list of files truncated 
   "/home/path/to/package/doc.file.r")[[25L]], 
       ...)
3: lapply(r_files(base_path), parse_file, env = env)
2: parse_package(base_path, load_code)
1: roxygenize("~/Current/r/path/to/package/")
@hadley hadley closed this in a557ed2 Feb 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant