Clearer error reporting.

This commit is contained in:
Tadas Baltrusaitis 2017-11-14 20:19:11 +00:00
parent d28342a5d6
commit c547b380b6
2 changed files with 6 additions and 1 deletions

View File

@ -130,6 +130,11 @@ RecorderOpenFace::RecorderOpenFace(const std::string in_filename, RecorderOpenFa
// Write in the of file what we are outputing what is the input etc.
metadata_file.open(of_det_name.string(), std::ios_base::out);
if (!metadata_file.is_open())
{
cout << "ERROR: could not open the output file:" << of_det_name << ", either the path of the output directory is wrong or you do not have the permissions to write to it" << endl;
exit(1);
}
// Populate the metadata file
metadata_file << "Input:" << in_filename << endl;

View File

@ -49,7 +49,7 @@ if(~exist(output, 'file'))
mkdir(output)
end
command = sprintf('%s -2Dfp -out_dir "%s -mloc model/main_clm_general.txt " ', executable, output);
command = sprintf('%s -2Dfp -out_dir "%s" -mloc model/main_clm_general.txt ', executable, output);
% add all videos to single argument list (so as not to load the model anew
% for every video)