jcuda
Class CudaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by jcuda.CudaException
All Implemented Interfaces:
java.io.Serializable

public class CudaException
extends java.lang.RuntimeException

An exception that may be thrown due to a CUDA error.

For the JCuda runtime API, exceptions may be enabled or disabled using JCuda#setExceptionsEnabled(boolean). If exceptions are enabled, the CUDA binding methods will throw a CudaException if the CUDA function did not return cudaError.cudaSuccess.

For the JCuda driver API, exceptions may be enabled or disabled using JCudaDriver#setExceptionsEnabled(boolean). If exceptions are enabled, the CUDA binding methods will throw a CudaException if the CUDA function did not return CUresult.CUDA_SUCCESS.

See Also:
Serialized Form

Constructor Summary
CudaException(java.lang.String message)
          Creates a new CudaException with the given error message.
CudaException(java.lang.String message, java.lang.Throwable cause)
          Creates a new CudaException with the given error message and the given Throwable as the cause.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CudaException

public CudaException(java.lang.String message)
Creates a new CudaException with the given error message.

Parameters:
message - The error message for this CudaException

CudaException

public CudaException(java.lang.String message,
                     java.lang.Throwable cause)
Creates a new CudaException with the given error message and the given Throwable as the cause.

Parameters:
message - The error message for this CudaException
cause - The reason for this CudaException