java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.codecrete.usb.USBException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
USBStallException
,USBTimeoutException
USB exception, thrown if an operation with USB devices fails.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUSBException
(String message) Creates a new instance with a message.USBException
(String message, int errorCode) Creates a new instance with a message and an error code.USBException
(String message, Throwable cause) Creates a new instance with a message and a causal exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
USBException
Creates a new instance with a message.- Parameters:
message
- the message
-
USBException
Creates a new instance with a message and an error code.- Parameters:
message
- the messageerrorCode
- the error code
-
USBException
Creates a new instance with a message and a causal exception.- Parameters:
message
- the messagecause
- the causal exception
-
-
Method Details
-
errorCode
public int errorCode()Gets the error code.- Returns:
- the error code
-