It was very straightforward indeed.
Patching line 324 of roclet-rd.R with the following seems to do the trick:
if (is.null(name)){
# get the location and filename from srcref
ll <- partitum$srcref$lloc
stop("Missing name in block ", basename(partitum$srcref$filename),
":lines ", ll[1], "-", ll[3])
}
More verbose error messages for other types of errors (e.g. related to
wrong usage of roxygen flags) would still be nice to have as well, but
this at least allows to pinpoint very problematic blocks.
This brought me to another question (which might need a separate post
though): it seems that union class names are not extracted (throws the
error: Missing name).
Thank you
Renaud
On 21/09/2011 17:20, Hadley Wickham wrote:
I know it is my third post today... I would really like to migrate my
package (at least partially) to roxygen2 documentations, but I keep getting
into troubles (...).
I now get the following error message:
Error in roclet_rd_one(partitum, base_path) : Missing name
It seems that any roxygen block could throw this error, and it is very hard
to track down the issue in big projects.
It would be nice to provide the user with at least some more details on
which block was being parsed when the error occurred. Give the filename and
line number would obviously be even better.
Yes, agreed.
Hadley, I saw your Feature-Issue on the subject
(https://github.com/klutometis/roxygen/issues/13).
Does the development version implement this feature already?
No, not yet.
Hadley
###
UNIVERSITY OF CAPE TOWN
This e-mail is subject to the UCT ICT policies and e-mail disclaimer published
on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or
obtainable from +27 21 650 9111. This e-mail is intended only for the person(s)
to whom it is addressed. If the e-mail has reached you in error, please notify
the author. If you are not the intended recipient of the e-mail you may not
use, disclose, copy, redirect or print the content. If this e-mail is not
related to the business of UCT it is sent by the sender in the sender's
individual capacity.
###
_______________________________________________
Roxygen-devel mailing list
Roxygen-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel