summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLException.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-19 02:56:04 +0200
committerMichael Bien <[email protected]>2009-10-19 02:56:04 +0200
commit9abfd00399e4ca5c351df9cdf25cd85c960b3d44 (patch)
tree0b44ac0da5c03fdd08a4039b25238c240bda1857 /src/com/mbien/opencl/CLException.java
parent01ae874925c4471d76ee6b18f15bf201c6f12f48 (diff)
initial import of CLProgram. Updated JUnit Test accordingly.
Diffstat (limited to 'src/com/mbien/opencl/CLException.java')
-rw-r--r--src/com/mbien/opencl/CLException.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLException.java b/src/com/mbien/opencl/CLException.java
index f439e89b..5806d41d 100644
--- a/src/com/mbien/opencl/CLException.java
+++ b/src/com/mbien/opencl/CLException.java
@@ -22,6 +22,12 @@ public class CLException extends RuntimeException {
super(identifyError(error) + ": " + message);
}
+ public static final void checkForError(int status, String message) {
+ if(status != CL.CL_SUCCESS)
+ throw new CLException(status, message);
+ }
+
+
private static final String identifyError(int error) {
switch (error) {