summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/units.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/units.cpp b/src/util/units.cpp
index e5c6f74fb..59717d0b5 100644
--- a/src/util/units.cpp
+++ b/src/util/units.cpp
@@ -321,6 +321,9 @@ bool UnitTable::load(std::string const &filename) {
Glib::ustring unitfile = Glib::file_get_contents(filename);
ctx.parse(unitfile);
ctx.end_parse();
+ } catch (Glib::FileError const &e) {
+ g_warning("Units file %s is missing: %s\n", filename.c_str(), e.what().c_str());
+ return false;
} catch (Glib::MarkupError const &e) {
g_warning("Problem loading units file '%s': %s\n", filename.c_str(), e.what().c_str());
return false;