aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-06 18:01:01 -0700
committerChris Robinson <[email protected]>2013-10-06 18:01:01 -0700
commit5d014ba85f39ddd57c03221a1dcf7d0cf3b1101f (patch)
tree1a932112cec40aae09d9de8c7578ad3321dbc5f5 /OpenAL32/Include
parent79edd2cf3b46b22d3e6c57aec11b942809f24ff3 (diff)
Start using a simpler method for error handling
This helps avoid the al_try/al_throwerr/al_endtry stuff.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 004c4016..92d6e7a8 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -869,6 +869,21 @@ enum {
void FillCPUCaps(ALuint capfilter);
+#define SET_ERROR_AND_RETURN(ctx, err) do { \
+ alSetError((ctx), (err)); \
+ return; \
+} while(0)
+
+#define SET_ERROR_AND_RETURN_VAL(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)
+
/**
* Starts a try block. Must not be nested within another try block within the
* same function.