Improve error message for bad NAMESPACE file?
On Tue, 7 Feb 2006, Seth Falcon wrote:
If a user mis-types a directive in the NAMESPACE file, the error
message is quite cryptic. If it was possible to report the offending
line/text that would likely give a valuable clue to the user.
Try putting the following line in NAMESPACE
foo("bar")
Then R CMD INSTALL says,
* Installing *source* package 'goodbye' ...
** R
** preparing package for lazy loading
Error in gettext(domain, unlist(args)) : invalid 'domain' value
Execution halted
ERROR: lazy loading failed for package 'goodbye'
I suspect this line in namespace.R:
}
stop(gettextf("unknown namespace directive: %s", deparse(e)),
call. = FALSE, domain = FALSE)
Does domain=NA solve this?
platform powerpc-apple-darwin8.4.0 arch powerpc os darwin8.4.0 system powerpc, darwin8.4.0 status Under development (unstable) major 2 minor 3.0 year 2006 month 02 day 05 svn rev 37270 language R version.string Version 2.3.0 Under development (unstable) (2006-02-05 r37270) -- + seth
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595