2016-09-20 Carl Hetherington <cth@carlh.net>
+ * Give better errors on SubRip parse failures.
+
* Version 2.9.23 released.
2016-09-20 Carl Hetherington <cth@carlh.net>
return (('ffmpeg-cdist', '1d4a1a4', ffmpeg_options),
('libdcp', 'b105b7d'),
- ('libsub', '067c21c'))
+ ('libsub', '79e49c2'))
def configure_options(target):
opt = ''
/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "log.h"
#include "compose.hpp"
#include <dcp/exceptions.h>
+#include <sub/exceptions.h>
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
+#include <boost/foreach.hpp>
#include <iostream>
#include "i18n.h"
set_state (FINISHED_CANCELLED);
+ } catch (sub::SubripError& e) {
+
+ string extra = "Error is near:\n";
+ BOOST_FOREACH (string i, e.context()) {
+ extra += i + "\n";
+ }
+
+ set_error (e.what (), extra);
+ set_progress (1);
+ set_state (FINISHED_ERROR);
+
} catch (std::bad_alloc& e) {
set_error (_("Out of memory"), _("There was not enough memory to do this. If you are running a 32-bit operating system try reducing the number of encoding threads in the General tab of Preferences."));