diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-10-05 16:00:17 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-10-05 16:00:17 +0200 |
commit | 6b35154562eff1e2c31b740655641d49cb26bedd (patch) | |
tree | 7147801671943ff758476e358305bb03ff3995af /src/osc_graphics.h | |
parent | 4bb5ce0be62671f7c5127d969c682d57e971679b (diff) | |
download | osc-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.h | 16 |
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 */ |