Class CLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jocl.CLException
- All Implemented Interfaces:
Serializable
An exception that may be thrown due to a OpenCL error.
Exceptions may be enabled or disabled using
Exceptions may be enabled or disabled using
CL#setExceptionsEnabled(boolean).
If exceptions are enabled, the JOCL methods will throw a
CLException if the OpenCL function did not return CL_SUCCESS.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCLException(String message) Creates a new CLException with the given error message.CLException(String message, int status) Creates a new CLException with the given error message.CLException(String message, Throwable cause) Creates a new CLException with the given error message.CLException(String message, Throwable cause, int status) Creates a new CLException with the given error message. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the status code from OpenCL that caused this exception.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CLException
Creates a new CLException with the given error message.- Parameters:
message- The error message for this CLException
-
CLException
Creates a new CLException with the given error message.- Parameters:
message- The error message for this CLExceptionstatus- The status code from OpenCL
-
CLException
-
CLException
-
-
Method Details
-
getStatus
public int getStatus()Returns the status code from OpenCL that caused this exception. For example, the value ofCL.CL_INVALID_DEVICE- Returns:
- The OpenCL status code
-