struct timeval last_pulse;
gettimeofday (&last_pulse, 0);
- while (!player->pass()) {
-
- struct timeval now;
- gettimeofday (&now, 0);
- if ((seconds(now) - seconds(last_pulse)) > 1) {
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_stop) {
- break;
+ try {
+ while (!player->pass()) {
+
+ struct timeval now;
+ gettimeofday (&now, 0);
+ if ((seconds(now) - seconds(last_pulse)) > 1) {
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ if (_stop) {
+ break;
+ }
}
+ emit (bind (boost::ref(Pulse)));
+ last_pulse = now;
}
- emit (bind (boost::ref(Pulse)));
- last_pulse = now;
}
+ } catch (...) {
+ store_current ();
}
emit (bind(boost::ref(Finished)));
class Film;
-class Hints : public Signaller
+class Hints : public Signaller, public ExceptionStore
{
public:
explicit Hints (boost::weak_ptr<const Film> film);
void
HintsDialog::finished ()
{
+ try {
+ _hints->rethrow ();
+ } catch (std::exception& e) {
+ error_dialog (this, wxString::Format(_("A problem occurred when looking for hints (%s)"), std_to_wx(e.what())));
+ }
+
_finished = true;
update ();
_gauge->Hide ();