Change-Id: Ia4d3d2fa715708f04fded238305543640e78424a
public:
Guardian(const std::function<void()> &start, const std::function<void()> &end)
: m_start(start), m_end(end) { m_start(); }
- ~Guardian() { m_end(); }
+ ~Guardian() {
+ try {
+ m_end();
+ } catch (...) {
+ /* Token catch just because this
+ * is a destructor, which can't rethrow.
+ * Ignore because we can rely on people
+ * not to use stupid guard functions. */
+ }
+ }
};
bool fileExists(const std::string &path) {