From 6b35154562eff1e2c31b740655641d49cb26bedd Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 5 Oct 2012 16:00:17 +0200 Subject: cleaned up error reporting * introduced FFMPEG_ERROR() macro * fixed recorder's error handling --- src/osc_graphics.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/osc_graphics.h') 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 */ -- cgit v1.2.3