🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
807 B

  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