summaryrefslogtreecommitdiff
path: root/src/lib/exceptions.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-09 00:58:42 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-13 00:23:41 +0200
commit350afcbc40fffd8c8780180e153a2ee91088f562 (patch)
treeccbabb8b91239555ed01ca762d2f56b02858a8cf /src/lib/exceptions.cc
parenta16523af5f70b60f4890f198f6214177077a9c1d (diff)
Tidy up nanomsg class API; add unmounting for Linux.
Diffstat (limited to 'src/lib/exceptions.cc')
-rw-r--r--src/lib/exceptions.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/exceptions.cc b/src/lib/exceptions.cc
index d394ad4b2..3991c57b9 100644
--- a/src/lib/exceptions.cc
+++ b/src/lib/exceptions.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -25,6 +25,7 @@
using std::string;
using std::runtime_error;
+using boost::optional;
/** @param f File that we were trying to open */
OpenFileError::OpenFileError (boost::filesystem::path f, int error, Mode mode)
@@ -115,14 +116,20 @@ GLError::GLError (char const * last, int e)
}
-CopyError::CopyError (string m, int n)
- : runtime_error (String::compose("%1 (%2)", m, n))
+CopyError::CopyError (string m, optional<int> n)
+ : runtime_error (String::compose("%1%2", m, n ? String::compose(" (%1)", *n) : ""))
, _message (m)
, _number (n)
{
}
+CommunicationFailedError::CommunicationFailedError ()
+ : CopyError (_("Lost communication between main and writer processes"))
+{
+
+}
+
VerifyError::VerifyError (string m, int n)
: runtime_error (String::compose("%1 (%2)", m, n))
, _message (m)