klmr / box

Write reusable, composable and modular R code
https://klmr.me/box/
MIT License
862 stars 48 forks source link

Improve error message for `box::use('foo')` #253

Closed klmr closed 2 years ago

klmr commented 2 years ago

Please describe your feature request

The current error messages for the calls

box::use('foo')

and

box::use(./'foo')

are confusing:

Error in box::use("foo") : unexpected token in “foo” (inside “parse_spec_impl(expr)”)

and

Error in box::use(./"foo") : expected module name or attach list, got “foo” (inside “parse_mod(expr)”)

Improve them: