alError.h 807 B

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