summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-23 22:01:53 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-30 02:19:51 +0200
commit0ca7704a5ab4417a94c9911ace52eba787535ffe (patch)
tree0b416ad8549acb076af814d24a22ace379adc2f1 /client
parent788418db651080f37fea16690c46f84fa8cf7d81 (diff)
downloadspice-0ca7704a5ab4417a94c9911ace52eba787535ffe.tar.gz
spice-0ca7704a5ab4417a94c9911ace52eba787535ffe.tar.xz
spice-0ca7704a5ab4417a94c9911ace52eba787535ffe.zip
spicec: warn when throwing exception
This helps to identify the code location of exception
Diffstat (limited to 'client')
-rw-r--r--client/utils.h3
1 files changed, 3 insertions, 0 deletions
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 <spice/error_codes.h>
#include <spice/macros.h>
@@ -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); \
}