aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/resolve_common.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-04-20 16:16:51 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-04-20 16:16:58 +0100
commit6799335fe963065080cee343cfecb32b58af4651 (patch)
treebb4a7007b50db612ccc34208eb30e4fa5aad6f7e /src/clients/cave/resolve_common.cc
parentb20013e387047ba016cbee9014093dd76225c7d1 (diff)
downloadpaludis-6799335fe963065080cee343cfecb32b58af4651.tar.gz
paludis-6799335fe963065080cee343cfecb32b58af4651.tar.xz
Look for exceptions inside threads
Diffstat (limited to 'src/clients/cave/resolve_common.cc')
-rw-r--r--src/clients/cave/resolve_common.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 45a779f6b..835e7674a 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013 Ciaran McCreesh
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -231,9 +231,18 @@ namespace
void serialise_resolved(StringListStream & ser_stream, const Resolved & resolved)
{
- Serialiser ser(ser_stream);
- resolved.serialise(ser);
- ser_stream.nothing_more_to_write();
+ try
+ {
+ Serialiser ser(ser_stream);
+ resolved.serialise(ser);
+ ser_stream.nothing_more_to_write();
+ }
+ catch (const std::exception & e)
+ {
+ std::cerr << "Things are about go to horribly wrong. Got an exception whilst serialising: "
+ << e.what() << std::endl;
+ throw;
+ }
}
int display_resolution(