Free Electron
alError.h
1 #ifndef _AL_ERROR_H_
2 #define _AL_ERROR_H_
3 
4 #include "alMain.h"
5 #include "logging.h"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 extern ALboolean TrapALError;
12 
13 void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);
14 
15 #define SETERR_GOTO(ctx, err, lbl, ...) do { \
16  alSetError((ctx), (err), __VA_ARGS__); \
17  goto lbl; \
18 } while(0)
19 
20 #define SETERR_RETURN(ctx, err, retval, ...) do { \
21  alSetError((ctx), (err), __VA_ARGS__); \
22  return retval; \
23 } while(0)
24 
25 #ifdef __cplusplus
26 }
27 #endif
28 
29 #endif