From 072e2bc8edab836217f4986c5dd9a95f483fd157 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 18 Jul 2012 00:40:20 +0100 Subject: Use our own exceptions. --- src/util.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/util.cc') 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* 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* 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); -- cgit v1.2.3