Package gda.device

Class DeviceException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccessDeniedException, DetectorShutterCouplingException, GainWithScalingAndOffset.MoveProhibitedException, GainWithScalingAndOffset.OptionsExhausedException, JCameramanController.JCameramanException, MotorException, ReadOnlyDetectorZException, RedoScanLineThrowable, RobotExternalStateCheck.InvalidExternalState

public class DeviceException extends Exception
An Exception class specifically for Devices.
See Also:
  • Constructor Details

    • DeviceException

      public DeviceException(String message)
      Constructs a device exception.
      Parameters:
      message - the exception message to be passed to the receiver
    • DeviceException

      public DeviceException(String message, Throwable cause)
      Constructs a device exception with another Throwable as the cause.
      Parameters:
      message - the message for this Exception
      cause - the cause (will become the detail message).
    • DeviceException

      public DeviceException(Throwable cause)
      Constructs a new DeviceException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables.
      Parameters:
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • DeviceException

      public DeviceException(String deviceName, String message)
      Constructs a DeviceException with a name of the Device which was the cause of the exception.
      Parameters:
      deviceName -
      message -
    • DeviceException

      public DeviceException(String deviceName, String message, Throwable cause)
      Constructs a DeviceException with a name of the Device which was the cause of the exception.
      Parameters:
      deviceName -
      message -
      cause -
    • DeviceException

      public DeviceException(Device device, String message)
      Constructs a DeviceException with the Device which was the cause of the exception.

      The object reference will be lost if this exception is serialized, but the name will be kept.

      Parameters:
      device -
      message -
    • DeviceException

      public DeviceException(Device device, String message, Throwable cause)
      Constructs a DeviceException with a name of the Device which was the cause of the exception.

      The object reference will be lost if this exception is serialized, but the name will be kept.

      Parameters:
      device -
      message -
      cause -
  • Method Details

    • getDeviceName

      public String getDeviceName()
      May be not necessarily have been set.
      Returns:
      - the Device reference
    • getDevice

      public Device getDevice()
      Will be null if the exception has been sent over CORBA - use getDeviceName() instead.
      Returns:
      - the Device reference