summaryrefslogtreecommitdiff
path: root/src/lib/exceptions.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-03-11 20:23:11 +0000
committerCarl Hetherington <cth@carlh.net>2020-03-11 21:24:28 +0100
commitbc36ddea65fda2088f7e8fa98390e3feac07df84 (patch)
treefb9b7f9ff44f256a2b740e5c5b97893ca5ece82e /src/lib/exceptions.cc
parent755694dd44cf5a012825b8b822da3738461b81ad (diff)
Give a better error when opening a DCP with File -> Open by mistake (#1723).
Diffstat (limited to 'src/lib/exceptions.cc')
-rw-r--r--src/lib/exceptions.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/exceptions.cc b/src/lib/exceptions.cc
index 99d4c3979..ba3d4a05c 100644
--- a/src/lib/exceptions.cc
+++ b/src/lib/exceptions.cc
@@ -40,6 +40,13 @@ OpenFileError::OpenFileError (boost::filesystem::path f, int error, Mode mode)
}
+FileNotFoundError::FileNotFoundError (boost::filesystem::path f)
+ : runtime_error(String::compose("File %1 not found", f.string()))
+ , _file (f)
+{
+
+}
+
ReadFileError::ReadFileError (boost::filesystem::path f, int e)
: FileError (String::compose (_("could not read from file %1 (%2)"), f.string(), strerror (e)), f)
{