From cbfac2fdccc83b04d9c2027e9e21070d4ac7c7e5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 1 May 2007 15:16:17 +0000 Subject: * Set a terminate() handler to ensure that we leave the BDB environment cleanly even when an exception is thrown from a destructor. We still crash, but we don't take all other Nix processes with us. --- src/libstore/remote-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/remote-store.cc') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 1aab90d38c52..449a4c448f0f 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -148,8 +148,8 @@ RemoteStore::~RemoteStore() fdSocket.close(); if (child != -1) child.wait(true); - } catch (Error & e) { - printMsg(lvlError, format("error (ignored): %1%") % e.msg()); + } catch (...) { + ignoreException(); } } -- cgit 1.4.1