Package gda.device
Class DeviceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
gda.device.DeviceException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AccessDeniedException,DetectorShutterCouplingException,GainWithScalingAndOffset.MoveProhibitedException,GainWithScalingAndOffset.OptionsExhausedException,JCameramanController.JCameramanException,MotorException,ReadOnlyDetectorZException,RedoScanLineThrowable,RobotExternalStateCheck.InvalidExternalState
An Exception class specifically for
Devices.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeviceException(Device device, String message) Constructs a DeviceException with the Device which was the cause of the exception.DeviceException(Device device, String message, Throwable cause) Constructs a DeviceException with a name of the Device which was the cause of the exception.DeviceException(String message) Constructs a device exception.DeviceException(String deviceName, String message) Constructs a DeviceException with a name of the Device which was the cause of the exception.DeviceException(String deviceName, String message, Throwable cause) Constructs a DeviceException with a name of the Device which was the cause of the exception.DeviceException(String message, Throwable cause) Constructs a device exception with another Throwable as the cause.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). -
Method Summary
Modifier and TypeMethodDescriptionWill be null if the exception has been sent over CORBA - use getDeviceName() instead.May be not necessarily have been set.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DeviceException
Constructs a device exception.- Parameters:
message- the exception message to be passed to the receiver
-
DeviceException
Constructs a device exception with another Throwable as the cause.- Parameters:
message- the message for this Exceptioncause- the cause (will become the detail message).
-
DeviceException
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 theThrowable.getCause()method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
-
DeviceException
Constructs a DeviceException with a name of the Device which was the cause of the exception.- Parameters:
deviceName-message-
-
DeviceException
Constructs a DeviceException with a name of the Device which was the cause of the exception.- Parameters:
deviceName-message-cause-
-
DeviceException
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
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
May be not necessarily have been set.- Returns:
- - the Device reference
-
getDevice
Will be null if the exception has been sent over CORBA - use getDeviceName() instead.- Returns:
- - the Device reference
-