[Spice-devel] [PATCH 01/11] spicec: warn when throwing exception
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Sep 24 04:42:12 PDT 2013
This helps to identify the code location of exception
---
client/utils.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/client/utils.h b/client/utils.h
index c23e04f..4657279 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); \
}
--
1.8.3.1
More information about the Spice-devel
mailing list