diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-08 18:11:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-08 18:11:52 +0100 |
| commit | cd4daa051e12b29618da8e24712b337f50d869cc (patch) | |
| tree | 48c5d8a03fa397cc7405510e214eeb3ac072264f | |
| parent | 5947a7e3ae78b5685fa2f0378e10878e5b8c4251 (diff) | |
Log email transcription even if ::send throws an exception.
| -rw-r--r-- | src/lib/cinema_kdms.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/cinema_kdms.cc b/src/lib/cinema_kdms.cc index 9fda6e2e9..d7495e9ac 100644 --- a/src/lib/cinema_kdms.cc +++ b/src/lib/cinema_kdms.cc @@ -169,7 +169,15 @@ CinemaKDMs::email ( email.add_attachment (zip_file, name, "application/zip"); Config* c = Config::instance (); - email.send (c->mail_server(), c->mail_port(), c->mail_user(), c->mail_password()); + + try { + email.send (c->mail_server(), c->mail_port(), c->mail_user(), c->mail_password()); + } catch (...) { + if (log) { + log->log (email.notes(), LogEntry::TYPE_DEBUG_EMAIL); + } + throw; + } if (log) { log->log (email.notes(), LogEntry::TYPE_DEBUG_EMAIL); |
