summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLException.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-12-02 14:49:41 +0100
committerMichael Bien <[email protected]>2009-12-02 14:49:41 +0100
commit72203a5d1f8896463ded10d1b21ca116621d1900 (patch)
tree93472cac4c61381ea9cdc48bbe97a59b2cd6f64b /src/com/mbien/opencl/CLException.java
parent7c7f5070dcbcc37afe36a4744161157cac49997c (diff)
fixed gcc setup on mac.
updated native taglet toc url. fixed small bug in cl char[] -> String conversion.
Diffstat (limited to 'src/com/mbien/opencl/CLException.java')
-rw-r--r--src/com/mbien/opencl/CLException.java20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/com/mbien/opencl/CLException.java b/src/com/mbien/opencl/CLException.java
index db4426f8..9e8adb77 100644
--- a/src/com/mbien/opencl/CLException.java
+++ b/src/com/mbien/opencl/CLException.java
@@ -1,27 +1,17 @@
package com.mbien.opencl;
/**
- * Main Exception type for runtime OpenCL errors and unsuccessfull function calls (e.g. returning other values than CL_SUCCESS).
+ * Main Exception type for runtime OpenCL errors and unsuccessful function calls (e.g. returning other values than CL_SUCCESS).
* @author Michael Bien
*/
public class CLException extends RuntimeException {
public final int errorcode;
-// public CLException(Throwable cause) {
-// super(cause);
-// }
-//
-// public CLException(String message, Throwable cause) {
-// super(message, cause);
-// }
-//
-// public CLException(String message) {
-// super(message);
-// }
+ private final static String ERROR_CODE_DOC = "http://www.khronos.org/opencl/sdk/1.0/docs/man/xhtml/errors.html";
public CLException(int error, String message) {
- super(identifyError(error) + ": " + message);
+ super(message + "\nerror: " + identifyError(error) + " (man page: "+ERROR_CODE_DOC+")");
errorcode = error;
}
@@ -177,9 +167,9 @@ public class CLException extends RuntimeException {
// return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
default:
- return "unknown cause: error " + error;
+ return "unknown cause: code" + error;
}
}
-}
+} \ No newline at end of file