From 0ca7704a5ab4417a94c9911ace52eba787535ffe Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 23 Sep 2013 22:01:53 +0200 Subject: spicec: warn when throwing exception This helps to identify the code location of exception --- client/utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/utils.h') diff --git a/client/utils.h b/client/utils.h index c23e04fe..46572795 100644 --- a/client/utils.h +++ b/client/utils.h @@ -19,6 +19,7 @@ #define _H_UTILS #include "common.h" +#include "common/log.h" #include #include @@ -38,12 +39,14 @@ private: #define THROW(format, ...) { \ std::string exption_string; \ string_printf(exption_string, format, ## __VA_ARGS__ ); \ + spice_warning(format, ## __VA_ARGS__ ); \ throw Exception(exption_string); \ } #define THROW_ERR(err, format, ...) { \ std::string exption_string; \ string_printf(exption_string, format, ## __VA_ARGS__ ); \ + spice_warning(format, ## __VA_ARGS__ ); \ throw Exception(exption_string, err); \ } -- cgit