Created
May 15, 2013 12:21
-
-
Save rubber-duck/5583615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReturnType!fn checkedgl(alias fn) (ParameterTypeTuple!fn params, string file = __FILE__, size_t line = __LINE__) | |
{ | |
scope(success) | |
{ | |
auto errorCode = gl.getError(); | |
if(errorCode != 0) | |
throw new GlException(errorCode, file, line); | |
} | |
return fn(params); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment