From 72203a5d1f8896463ded10d1b21ca116621d1900 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Wed, 2 Dec 2009 14:49:41 +0100 Subject: fixed gcc setup on mac. updated native taglet toc url. fixed small bug in cl char[] -> String conversion. --- src/com/mbien/opencl/CLException.java | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/com/mbien/opencl/CLException.java') 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 -- cgit v1.2.3