From bb14f43134a9332c014e969b600e094edadd2fb0 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Thu, 15 Apr 2010 21:36:21 +0200 Subject: code review: improved exception messages to be more verbose whenever possible. began with CLKernel testcase. --- src/com/jogamp/opencl/CLSampler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/jogamp/opencl/CLSampler.java') diff --git a/src/com/jogamp/opencl/CLSampler.java b/src/com/jogamp/opencl/CLSampler.java index 79ef6067..5f6a9485 100644 --- a/src/com/jogamp/opencl/CLSampler.java +++ b/src/com/jogamp/opencl/CLSampler.java @@ -48,7 +48,9 @@ public class CLSampler extends CLObject implements CLResource { public void release() { int ret = cl.clReleaseSampler(ID); context.onSamplerReleased(this); - checkForError(ret, "can not release sampler"); + if(ret != CL.CL_SUCCESS) { + throw newException(ret, "can not release "+this); + } } public void close() { -- cgit v1.2.3