NCEAS / recordr

Provenance tracking for R.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

record() throws cryptic error when file to record is missing

gothub opened this issue · comments

The record() method doesn't handle well the case of the file to record not existing and the following error is printed:

Error in slot(recordrEnv$execMeta, "errorMessage") <- errorCond$message : 
  object 'recordrEnv' not found 

The test for file existence was in a tryCatch block, and stop() was being called, which was causing error processing to not be conducted correctly. The fix was to trigger a warning() so that error processing would run and properly cleanup before exiting. Fixed in commit f926eb0