You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not particuarly useful but one can guess the root of the problem. If you want to style a file that contains such an invalid expression, you get
How should we handle these cases? I don't have experience in error handling in packages so @krlmlr can you advise? Should we implement before submitting to CRAN? Also related to assertive tests etc.
Yes, but I think that's not very informative if you don't know which file is the problem. Maybe we add an argument assert_code to transform_files() and if set, we try parsing before executing the styling and return an informative error message if parsing fails for one of the files.
Activity
krlmlr commentedon Aug 19, 2017
Can we wrap a
tryCatch()around theparse()call?lorenzwalthert commentedon Aug 20, 2017
Yes, but I think that's not very informative if you don't know which file is the problem. Maybe we add an argument
assert_codetotransform_files()and if set, we try parsing before executing the styling and return an informative error message if parsing fails for one of the files.