1 // RegistryException.h: Schnittstelle für die Klasse RegistryException.
3 //////////////////////////////////////////////////////////////////////
5 #ifndef _REGISTRYEXCEPTION_HXX_
6 #define _REGISTRYEXCEPTION_HXX_
10 //#######################################
11 // Base class for all Registry exceptions
12 //#######################################
14 class RegistryException
: public std::exception
18 RegistryException(long ErrorCode
);
20 virtual ~RegistryException() throw();
23 @descr Returns a string that describes the error if
24 available, else NULL will be returned. The
25 returned string is only temporary so the caller
26 has to copy it if he needs the string further.
28 virtual const char* what() const throw();
31 @descr Returns the error code.
34 long GetErrorCode() const;
41 //#######################################
42 // Thrown when a Registry key is accessed
44 //#######################################
46 class RegistryIOException
: public RegistryException
49 RegistryIOException(long ErrorCode
);
52 //#######################################
53 // Thrown when trying to write to a readonly registry key
54 //#######################################
56 class RegistryNoWriteAccessException
: public RegistryException
59 RegistryNoWriteAccessException(long ErrorCode
);
62 //#######################################
63 // Thrown when trying to access an registry key, with improper
65 //#######################################
67 class RegistryAccessDeniedException
: public RegistryException
70 RegistryAccessDeniedException(long ErrorCode
);
73 //#######################################
74 // A specified registry value could not be read because it is not
76 //#######################################
78 class RegistryValueNotFoundException
: public RegistryException
81 RegistryValueNotFoundException(long ErrorCode
);
84 //#######################################
85 // A specified registry key was not found
86 //#######################################
88 class RegistryKeyNotFoundException
: public RegistryException
91 RegistryKeyNotFoundException(long ErrorCode
);
94 //#######################################
95 // A specified registry operation is invalid
96 //#######################################
98 class RegistryInvalidOperationException
: public RegistryException
101 RegistryInvalidOperationException(long ErrorCode
);