java.lang.Object
java.lang.Throwable
java.lang.Exception
com.github.kwhat.jnativehook.NativeHookException
- All Implemented Interfaces:
Serializable
Signals that a Native Hook Exception has occurred.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Alexander Barker (alex@1stleg.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intApple access for assistive devices is disabled.static final intApple could not create an event port.static final intApple could not create an observer.static final intApple could not create a run loop source.static final intApple could not acquire the current run loop.static final intGeneral failure error code.static final intUnspecified failure error code.static final intWindows SetWindowsHookEx function failed to register the low level hook.static final intX11 open display error code.static final intX11 extension XRecord could not allocate range.static final intX11 extension XRecord could not create a context.static final intX11 extension XRecord could not enable the context.static final intX11 extension XRecord could not enable the context.static final intX11 extension XRecord was not found. -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a newNativeHookExceptionwith UNKNOWN_FAILURE as its error code and null as its detail message.NativeHookException(int code) Instantiates a newNativeHookExceptionwith a specified error code and null as its detail message.NativeHookException(int code, String message) Instantiates a newNativeHookExceptionwith a specified code and detail message.NativeHookException(int code, String message, Throwable cause) Instantiates a newNativeHookExceptionwith a specified error code, detail message and cause.NativeHookException(int code, Throwable cause) Instantiates a newNativeHookExceptionwith a specified error code and cause.NativeHookException(String message) Instantiates a newNativeHookExceptionwith UNKNOWN_FAILURE as its error code and a specified detail message.NativeHookException(String message, Throwable cause) Instantiates a newNativeHookExceptionwith a specified detail message and cause.NativeHookException(Throwable cause) Instantiates a newNativeHookExceptionwith a specified cause. -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()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 Details
-
UNSPECIFIED_FAILURE
public static final int UNSPECIFIED_FAILUREUnspecified failure error code.- Since:
- 2.0
- See Also:
-
HOOK_FAILURE
public static final int HOOK_FAILUREGeneral failure error code.- Since:
- 2.0
- See Also:
-
X11_OPEN_DISPLAY
public static final int X11_OPEN_DISPLAYX11 open display error code.- Since:
- 2.0
- See Also:
-
X11_RECORD_NOT_FOUND
public static final int X11_RECORD_NOT_FOUNDX11 extension XRecord was not found.- Since:
- 2.0
- See Also:
-
X11_RECORD_ALLOC_RANGE
public static final int X11_RECORD_ALLOC_RANGEX11 extension XRecord could not allocate range.- Since:
- 2.0
- See Also:
-
X11_RECORD_CREATE_CONTEXT
public static final int X11_RECORD_CREATE_CONTEXTX11 extension XRecord could not create a context.- Since:
- 2.0
- See Also:
-
X11_RECORD_ENABLE_CONTEXT
public static final int X11_RECORD_ENABLE_CONTEXTX11 extension XRecord could not enable the context.- See Also:
-
X11_RECORD_GET_CONTEXT
public static final int X11_RECORD_GET_CONTEXTX11 extension XRecord could not enable the context.- See Also:
-
WIN_SET_HOOK
public static final int WIN_SET_HOOKWindows SetWindowsHookEx function failed to register the low level hook. See log level debug for details.- Since:
- 2.0
- See Also:
-
DARWIN_AXAPI_DISABLED
public static final int DARWIN_AXAPI_DISABLEDApple access for assistive devices is disabled.- See Also:
-
DARWIN_CREATE_EVENT_PORT
public static final int DARWIN_CREATE_EVENT_PORTApple could not create an event port.- See Also:
-
DARWIN_CREATE_RUN_LOOP_SOURCE
public static final int DARWIN_CREATE_RUN_LOOP_SOURCEApple could not create a run loop source.- See Also:
-
DARWIN_GET_RUNLOOP
public static final int DARWIN_GET_RUNLOOPApple could not acquire the current run loop.- See Also:
-
DARWIN_CREATE_OBSERVER
public static final int DARWIN_CREATE_OBSERVERApple could not create an observer.- See Also:
-
-
Constructor Details
-
NativeHookException
public NativeHookException()Instantiates a newNativeHookExceptionwith UNKNOWN_FAILURE as its error code and null as its detail message. -
NativeHookException
public NativeHookException(int code) Instantiates a newNativeHookExceptionwith a specified error code and null as its detail message.- Parameters:
code- The native error code.- Since:
- 2.0
-
NativeHookException
Instantiates a newNativeHookExceptionwith UNKNOWN_FAILURE as its error code and a specified detail message.- Parameters:
message- The detail message.
-
NativeHookException
Instantiates a newNativeHookExceptionwith a specified code and detail message.- Parameters:
code- The native error code.message- The detail message.- Since:
- 2.0
-
NativeHookException
Instantiates a newNativeHookExceptionwith 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
Instantiates a newNativeHookExceptionwith 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
Instantiates a newNativeHookExceptionwith a specified cause.- Parameters:
cause- The cause of the exception. A null value is permitted, and indicates that the cause is unknown.
-
NativeHookException
Instantiates a newNativeHookExceptionwith 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.
-
-
Method Details
-
getCode
public int getCode()Get the native error code associated with this exception.- Returns:
- The native error code
- Since:
- 2.0
-