diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:40:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:40:20 +0100 |
| commit | 072e2bc8edab836217f4986c5dd9a95f483fd157 (patch) | |
| tree | 80c01824a196f896c6c346552d6e1b5e08240bad /src/util.cc | |
| parent | dfd9622f157f1e778352e418eec53483af7ba724 (diff) | |
Use our own exceptions.
Diffstat (limited to 'src/util.cc')
| -rw-r--r-- | src/util.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.cc b/src/util.cc index 2968ef55..849b7d24 100644 --- a/src/util.cc +++ b/src/util.cc @@ -31,6 +31,7 @@ #include "KM_fileio.h" #include "AS_DCP.h" #include "util.h" +#include "exceptions.h" using namespace std; using namespace boost; @@ -52,7 +53,7 @@ libdcp::make_digest (string filename, sigc::signal1<void, float>* progress) Kumu::FileReader reader; if (ASDCP_FAILURE (reader.OpenRead (filename.c_str ()))) { - throw runtime_error ("could not open file to compute digest"); + throw FileError ("could not open file to compute digest", filename); } SHA_CTX sha; @@ -67,7 +68,7 @@ libdcp::make_digest (string filename, sigc::signal1<void, float>* progress) if (r == Kumu::RESULT_ENDOFFILE) { break; } else if (ASDCP_FAILURE (r)) { - throw runtime_error ("could not read file to compute digest"); + throw FileError ("could not read file to compute digest", filename); } SHA1_Update (&sha, read_buffer.Data(), read); |
