summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-14 09:34:09 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-14 09:34:09 +0100
commit3d6501346b187f35d0f55d16e13f8817f505a82f (patch)
treef57c153b99a5301de3e7024bc414706749974d0a /src/lib
parentcd29c4ed26fde9b9c07190f92205705b13c6bd73 (diff)
parent6b9c1b3bdec2b4396314ccf6bf2d5aeaa5402ae6 (diff)
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp_subtitle.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/dcp_subtitle.cc b/src/lib/dcp_subtitle.cc
index b0e114be2..f9aa7e0d9 100644
--- a/src/lib/dcp_subtitle.cc
+++ b/src/lib/dcp_subtitle.cc
@@ -20,34 +20,39 @@
#include "dcp_subtitle.h"
#include "exceptions.h"
+#include "compose.hpp"
#include <dcp/interop_subtitle_asset.h>
#include <dcp/smpte_subtitle_asset.h>
#include "i18n.h"
+using std::string;
+using std::exception;
using boost::shared_ptr;
shared_ptr<dcp::SubtitleAsset>
DCPSubtitle::load (boost::filesystem::path file) const
{
shared_ptr<dcp::SubtitleAsset> sc;
+ string interop_error;
+ string smpte_error;
try {
sc.reset (new dcp::InteropSubtitleAsset (file));
- } catch (...) {
-
+ } catch (exception& e) {
+ interop_error = e.what ();
}
if (!sc) {
try {
sc.reset (new dcp::SMPTESubtitleAsset (file));
- } catch (...) {
-
+ } catch (exception& e) {
+ smpte_error = e.what();
}
}
if (!sc) {
- throw FileError (_("Could not read subtitles"), file);
+ throw FileError (String::compose (_("Could not read subtitles (%1 / %2)"), interop_error, smpte_error), file);
}
return sc;