Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / setup_native / source / win32 / customactions / reg4msdoc / registryexception.hxx
blob4ea3a209885306488ce2cc9be2adc283516daaaf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // RegistryException.h: Schnittstelle für die Klasse RegistryException.
3 //
4 //////////////////////////////////////////////////////////////////////
6 #ifndef _REGISTRYEXCEPTION_HXX_
7 #define _REGISTRYEXCEPTION_HXX_
9 #include <exception>
11 //#######################################
12 // Base class for all Registry exceptions
13 //#######################################
15 class RegistryException : public std::exception
17 public:
19 RegistryException(long ErrorCode);
21 virtual ~RegistryException() throw();
23 /**
24 @descr Returns a string that describes the error if
25 available, else NULL will be returned. The
26 returned string is only temporary so the caller
27 has to copy it if he needs the string further.
29 virtual const char* what() const throw();
31 /**
32 @descr Returns the error code.
35 long GetErrorCode() const;
37 private:
38 long m_ErrorCode;
39 void* m_ErrorMsg;
42 //#######################################
43 // Thrown when a Registry key is accessed
44 // that is closed
45 //#######################################
47 class RegistryIOException : public RegistryException
49 public:
50 RegistryIOException(long ErrorCode);
53 //#######################################
54 // Thrown when trying to write to a readonly registry key
55 //#######################################
57 class RegistryNoWriteAccessException : public RegistryException
59 public:
60 RegistryNoWriteAccessException(long ErrorCode);
63 //#######################################
64 // Thrown when trying to access an registry key, with improper
65 // access rights
66 //#######################################
68 class RegistryAccessDeniedException : public RegistryException
70 public:
71 RegistryAccessDeniedException(long ErrorCode);
74 //#######################################
75 // A specified registry value could not be read because it is not
76 // available
77 //#######################################
79 class RegistryValueNotFoundException : public RegistryException
81 public:
82 RegistryValueNotFoundException(long ErrorCode);
85 //#######################################
86 // A specified registry key was not found
87 //#######################################
89 class RegistryKeyNotFoundException : public RegistryException
91 public:
92 RegistryKeyNotFoundException(long ErrorCode);
95 //#######################################
96 // A specified registry operation is invalid
97 //#######################################
99 class RegistryInvalidOperationException : public RegistryException
101 public:
102 RegistryInvalidOperationException(long ErrorCode);
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */