2007-11-13 18:02:18 -08:00
|
|
|
#ifndef _AL_ERROR_H_
|
|
|
|
#define _AL_ERROR_H_
|
|
|
|
|
2012-09-14 02:42:36 -07:00
|
|
|
#include "alMain.h"
|
2007-11-13 18:02:18 -08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-09-10 01:12:34 -07:00
|
|
|
extern ALboolean TrapALError;
|
|
|
|
|
2010-03-16 17:35:51 -07:00
|
|
|
ALvoid alSetError(ALCcontext *Context, ALenum errorCode);
|
2007-11-13 18:02:18 -08:00
|
|
|
|
2014-01-02 10:42:00 -08:00
|
|
|
#define SET_ERROR_AND_RETURN(ctx, err) do { \
|
|
|
|
alSetError((ctx), (err)); \
|
|
|
|
return; \
|
|
|
|
} while(0)
|
|
|
|
|
|
|
|
#define SET_ERROR_AND_RETURN_VALUE(ctx, err, val) do { \
|
|
|
|
alSetError((ctx), (err)); \
|
|
|
|
return (val); \
|
|
|
|
} while(0)
|
|
|
|
|
|
|
|
#define SET_ERROR_AND_GOTO(ctx, err, lbl) do { \
|
|
|
|
alSetError((ctx), (err)); \
|
|
|
|
goto lbl; \
|
|
|
|
} while(0)
|
|
|
|
|
2007-11-13 18:02:18 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|