Class UsbException
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(@NotNull String message) Creates a new instance with a message.UsbException(@NotNull String message, int errorCode) Creates a new instance with a message and an error code.UsbException(@NotNull String message, @Nullable 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
-
-
Method Details
-
getErrorCode
public int getErrorCode()Gets the error code.- Returns:
- the error code
-