[PATCH 17/22] Catch all std::exception derivatives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christophe de Dinechin <dinechin@xxxxxxxxxx>

std::bad_alloc is not an std::runtime_exception, it was not caught before.
We do not catch(...) on purpose, since calling 'terminate' and the abort()
that results is probably the best course of action in case some unknown
exception is thrown, if only because we can get a core dump.

Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx>
---
 src/spice-streaming-agent.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 1c5b6c1..9048935 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -633,7 +633,7 @@ int main(int argc, char* argv[])
         err.syslog();
         ret = EXIT_FAILURE;
     }
-    catch (std::runtime_error &err) {
+    catch (std::exception &err) {
         syslog(LOG_ERR, "%s\n", err.what());
         ret = EXIT_FAILURE;
     }
-- 
2.13.5 (Apple Git-94)

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]