From c547b380b67385068fdea838f91b61db7349d861 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Tue, 14 Nov 2017 20:19:11 +0000 Subject: [PATCH] Clearer error reporting. --- lib/local/Utilities/src/RecorderOpenFace.cpp | 5 +++++ matlab_runners/Feature Point Experiments/run_yt_dataset.m | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/local/Utilities/src/RecorderOpenFace.cpp b/lib/local/Utilities/src/RecorderOpenFace.cpp index 965424f..2feb8ca 100644 --- a/lib/local/Utilities/src/RecorderOpenFace.cpp +++ b/lib/local/Utilities/src/RecorderOpenFace.cpp @@ -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; diff --git a/matlab_runners/Feature Point Experiments/run_yt_dataset.m b/matlab_runners/Feature Point Experiments/run_yt_dataset.m index 6a05d66..c99d254 100644 --- a/matlab_runners/Feature Point Experiments/run_yt_dataset.m +++ b/matlab_runners/Feature Point Experiments/run_yt_dataset.m @@ -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)