Class RegistryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.github.robtimus.os.windows.registry.RegistryException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidRegistryHandleException, NoSuchRegistryKeyException, NoSuchRegistryValueException, RegistryAccessDeniedException, RegistryKeyAlreadyExistsException
Thrown when an error occurred while trying to access or modify the Windows registry.
- Author:
- Rob Spoor
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRegistryException(int errorCode, String path) Creates a new exception.RegistryException(int errorCode, String path, String machineName) Creates a new exception. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the error code that was returned from the Windows API.Returns the remote machine of the registry key for which this exception was thrown.path()Returns the path of the registry key for which this exception was thrown.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RegistryException
Creates a new exception.- Parameters:
errorCode- The error code that was returned from the Windows API.path- The path of the registry key for which this exception was thrown.
-
RegistryException
Creates a new exception.- Parameters:
errorCode- The error code that was returned from the Windows API.path- The path of the registry key for which this exception was thrown.machineName- The remote machine of the registry key for which this exception was thrown, ornullfor the local machine.- Since:
- 1.1
-
-
Method Details
-
errorCode
public int errorCode()Returns the error code that was returned from the Windows API.- Returns:
- The error code that was returned from the Windows API.
-
path
Returns the path of the registry key for which this exception was thrown.- Returns:
- The path of the registry key for which this exception was thrown.
-
machineName
Returns the remote machine of the registry key for which this exception was thrown.- Returns:
- The remote machine of the registry key for which this exception was thrown, or
nullfor the local machine. - Since:
- 1.1
-