aboutsummaryrefslogtreecommitdiff
path: root/src/osc_graphics.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-10-05 16:00:17 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-10-05 16:00:17 +0200
commit6b35154562eff1e2c31b740655641d49cb26bedd (patch)
tree7147801671943ff758476e358305bb03ff3995af /src/osc_graphics.h
parent4bb5ce0be62671f7c5127d969c682d57e971679b (diff)
downloadosc-graphics-6b35154562eff1e2c31b740655641d49cb26bedd.tar.gz
cleaned up error reporting
* introduced FFMPEG_ERROR() macro * fixed recorder's error handling
Diffstat (limited to 'src/osc_graphics.h')
-rw-r--r--src/osc_graphics.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/osc_graphics.h b/src/osc_graphics.h
index 9ae1ee4..d1260c4 100644
--- a/src/osc_graphics.h
+++ b/src/osc_graphics.h
@@ -54,11 +54,19 @@ public:
} \
} while (0)
-#define SDL_ERROR(FMT, ...) do { \
- fprintf(stderr, "%s(%d): " FMT ": %s\n", \
- __FILE__, __LINE__, ##__VA_ARGS__, SDL_GetError()); \
+#define WARNING(FMT, ...) do { \
+ fprintf(stderr, "%s(%d): Warning: " FMT "\n", \
+ __FILE__, __LINE__, ##__VA_ARGS__); \
} while (0)
-
+
+#define ERROR(FMT, ...) do { \
+ fprintf(stderr, "%s(%d): Error: " FMT "\n", \
+ __FILE__, __LINE__, ##__VA_ARGS__); \
+} while (0)
+
+#define SDL_ERROR(FMT, ...) \
+ ERROR(FMT ": %s", ##__VA_ARGS__, SDL_GetError())
+
/*
* Declarations
*/