- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.github.kwhat.jnativehook.NativeHookException
-
- All Implemented Interfaces:
Serializable
public class NativeHookException extends Exception
Signals that a Native Hook Exception has occurred.- Since:
- 1.0
- Version:
- 2.0
- Author:
- Alexander Barker (alex@1stleg.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DARWIN_AXAPI_DISABLED
Apple access for assistive devices is disabled.static int
DARWIN_CREATE_EVENT_PORT
Apple could not create an event port.static int
DARWIN_CREATE_OBSERVER
Apple could not create an observer.static int
DARWIN_CREATE_RUN_LOOP_SOURCE
Apple could not create a run loop source.static int
DARWIN_GET_RUNLOOP
Apple could not acquire the current run loop.static int
HOOK_FAILURE
General failure error code.static int
UNSPECIFIED_FAILURE
Unspecified failure error code.static int
WIN_SET_HOOK
Windows SetWindowsHookEx function failed to register the low level hook.static int
X11_OPEN_DISPLAY
X11 open display error code.static int
X11_RECORD_ALLOC_RANGE
X11 extension XRecord could not allocate range.static int
X11_RECORD_CREATE_CONTEXT
X11 extension XRecord could not create a context.static int
X11_RECORD_ENABLE_CONTEXT
X11 extension XRecord could not enable the context.static int
X11_RECORD_GET_CONTEXT
X11 extension XRecord could not enable the context.static int
X11_RECORD_NOT_FOUND
X11 extension XRecord was not found.
-
Constructor Summary
Constructors Constructor Description NativeHookException()
Instantiates a newNativeHookException
with UNKNOWN_FAILURE as its error code and null as its detail message.NativeHookException(int code)
Instantiates a newNativeHookException
with a specified error code and null as its detail message.NativeHookException(int code, String message)
Instantiates a newNativeHookException
with a specified code and detail message.NativeHookException(int code, String message, Throwable cause)
Instantiates a newNativeHookException
with a specified error code, detail message and cause.NativeHookException(int code, Throwable cause)
Instantiates a newNativeHookException
with a specified error code and cause.NativeHookException(String message)
Instantiates a newNativeHookException
with UNKNOWN_FAILURE as its error code and a specified detail message.NativeHookException(String message, Throwable cause)
Instantiates a newNativeHookException
with a specified detail message and cause.NativeHookException(Throwable cause)
Instantiates a newNativeHookException
with a specified cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCode()
Get the native error code associated with this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
UNSPECIFIED_FAILURE
public static final int UNSPECIFIED_FAILURE
Unspecified failure error code.- Since:
- 2.0
- See Also:
- Constant Field Values
-
HOOK_FAILURE
public static final int HOOK_FAILURE
General failure error code.- Since:
- 2.0
- See Also:
- Constant Field Values
-
X11_OPEN_DISPLAY
public static final int X11_OPEN_DISPLAY
X11 open display error code.- Since:
- 2.0
- See Also:
- Constant Field Values
-
X11_RECORD_NOT_FOUND
public static final int X11_RECORD_NOT_FOUND
X11 extension XRecord was not found.- Since:
- 2.0
- See Also:
- Constant Field Values
-
X11_RECORD_ALLOC_RANGE
public static final int X11_RECORD_ALLOC_RANGE
X11 extension XRecord could not allocate range.- Since:
- 2.0
- See Also:
- Constant Field Values
-
X11_RECORD_CREATE_CONTEXT
public static final int X11_RECORD_CREATE_CONTEXT
X11 extension XRecord could not create a context.- Since:
- 2.0
- See Also:
- Constant Field Values
-
X11_RECORD_ENABLE_CONTEXT
public static final int X11_RECORD_ENABLE_CONTEXT
X11 extension XRecord could not enable the context.- See Also:
- Constant Field Values
-
X11_RECORD_GET_CONTEXT
public static final int X11_RECORD_GET_CONTEXT
X11 extension XRecord could not enable the context.- See Also:
- Constant Field Values
-
WIN_SET_HOOK
public static final int WIN_SET_HOOK
Windows SetWindowsHookEx function failed to register the low level hook. See log level debug for details.- Since:
- 2.0
- See Also:
- Constant Field Values
-
DARWIN_AXAPI_DISABLED
public static final int DARWIN_AXAPI_DISABLED
Apple access for assistive devices is disabled.- See Also:
- Constant Field Values
-
DARWIN_CREATE_EVENT_PORT
public static final int DARWIN_CREATE_EVENT_PORT
Apple could not create an event port.- See Also:
- Constant Field Values
-
DARWIN_CREATE_RUN_LOOP_SOURCE
public static final int DARWIN_CREATE_RUN_LOOP_SOURCE
Apple could not create a run loop source.- See Also:
- Constant Field Values
-
DARWIN_GET_RUNLOOP
public static final int DARWIN_GET_RUNLOOP
Apple could not acquire the current run loop.- See Also:
- Constant Field Values
-
DARWIN_CREATE_OBSERVER
public static final int DARWIN_CREATE_OBSERVER
Apple could not create an observer.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NativeHookException
public NativeHookException()
Instantiates a newNativeHookException
with UNKNOWN_FAILURE as its error code and null as its detail message.
-
NativeHookException
public NativeHookException(int code)
Instantiates a newNativeHookException
with a specified error code and null as its detail message.- Parameters:
code
- The native error code.- Since:
- 2.0
-
NativeHookException
public NativeHookException(String message)
Instantiates a newNativeHookException
with UNKNOWN_FAILURE as its error code and a specified detail message.- Parameters:
message
- The detail message.
-
NativeHookException
public NativeHookException(int code, String message)
Instantiates a newNativeHookException
with a specified code and detail message.- Parameters:
code
- The native error code.message
- The detail message.- Since:
- 2.0
-
NativeHookException
public NativeHookException(String message, Throwable cause)
Instantiates a newNativeHookException
with a specified detail message and cause.- Parameters:
message
- The detail message.cause
- The cause of the exception. A null value is permitted, and indicates that the cause is unknown.
-
NativeHookException
public NativeHookException(int code, String message, Throwable cause)
Instantiates a newNativeHookException
with a specified error code, detail message and cause.- Parameters:
code
- The native error code.message
- The detail message.cause
- The cause of the exception. A null value is permitted, and indicates that the cause is unknown.- Since:
- 2.0
-
NativeHookException
public NativeHookException(Throwable cause)
Instantiates a newNativeHookException
with a specified cause.- Parameters:
cause
- The cause of the exception. A null value is permitted, and indicates that the cause is unknown.
-
NativeHookException
public NativeHookException(int code, Throwable cause)
Instantiates a newNativeHookException
with a specified error code and cause.- Parameters:
code
- The native error code.cause
- The cause of the exception. A null value is permitted, and indicates that the cause is unknown.
-
-