diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-12 20:29:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-12 20:29:27 +0100 |
| commit | 8218bf98ca1ec9399a968e57f416e110e14d5d9f (patch) | |
| tree | 94cb4522463234da37ebcefc10c0c2dcbd5842aa /src/lib | |
| parent | 9303bb36391c2ce3c471dafffefbcbbaf3995be0 (diff) | |
Catch exceptions when checking disk space.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/job.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc index ff0332d6d..f830975af 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -68,11 +68,15 @@ Job::run_wrapper () set_state (FINISHED_ERROR); string m = String::compose (_("An error occurred whilst handling the file %1."), boost::filesystem::path (e.filename()).leaf()); - - boost::filesystem::space_info const s = boost::filesystem::space (e.filename()); - if (s.available < pow (1024, 3)) { - m += N_("\n\n"); - m += _("The drive that the film is stored on is low in disc space. Free some more space and try again."); + + try { + boost::filesystem::space_info const s = boost::filesystem::space (e.filename()); + if (s.available < pow (1024, 3)) { + m += N_("\n\n"); + m += _("The drive that the film is stored on is low in disc space. Free some more space and try again."); + } + } catch (...) { + } set_error (e.what(), m); |
