Update ooo320-m1
[ooovba.git] / setup_native / source / win32 / customactions / reg4msdoc / registryexception.hxx
blob7b903420a4e552bf078d026708c126a8290d431d
1 // RegistryException.h: Schnittstelle für die Klasse RegistryException.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #ifndef _REGISTRYEXCEPTION_HXX_
6 #define _REGISTRYEXCEPTION_HXX_
8 #include <exception>
10 //#######################################
11 // Base class for all Registry exceptions
12 //#######################################
14 class RegistryException : public std::exception
16 public:
18 RegistryException(long ErrorCode);
20 virtual ~RegistryException() throw();
22 /**
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();
30 /**
31 @descr Returns the error code.
34 long GetErrorCode() const;
36 private:
37 long m_ErrorCode;
38 void* m_ErrorMsg;
41 //#######################################
42 // Thrown when a Registry key is accessed
43 // that is closed
44 //#######################################
46 class RegistryIOException : public RegistryException
48 public:
49 RegistryIOException(long ErrorCode);
52 //#######################################
53 // Thrown when trying to write to a readonly registry key
54 //#######################################
56 class RegistryNoWriteAccessException : public RegistryException
58 public:
59 RegistryNoWriteAccessException(long ErrorCode);
62 //#######################################
63 // Thrown when trying to access an registry key, with improper
64 // access rights
65 //#######################################
67 class RegistryAccessDeniedException : public RegistryException
69 public:
70 RegistryAccessDeniedException(long ErrorCode);
73 //#######################################
74 // A specified registry value could not be read because it is not
75 // available
76 //#######################################
78 class RegistryValueNotFoundException : public RegistryException
80 public:
81 RegistryValueNotFoundException(long ErrorCode);
84 //#######################################
85 // A specified registry key was not found
86 //#######################################
88 class RegistryKeyNotFoundException : public RegistryException
90 public:
91 RegistryKeyNotFoundException(long ErrorCode);
94 //#######################################
95 // A specified registry operation is invalid
96 //#######################################
98 class RegistryInvalidOperationException : public RegistryException
100 public:
101 RegistryInvalidOperationException(long ErrorCode);
104 #endif