1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // RegistryException.h: Schnittstelle für die Klasse RegistryException.
4 //////////////////////////////////////////////////////////////////////
6 #ifndef _REGISTRYEXCEPTION_HXX_
7 #define _REGISTRYEXCEPTION_HXX_
11 //#######################################
12 // Base class for all Registry exceptions
13 //#######################################
15 class RegistryException
: public std::exception
19 RegistryException(long ErrorCode
);
21 virtual ~RegistryException() throw();
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();
32 @descr Returns the error code.
35 long GetErrorCode() const;
42 //#######################################
43 // Thrown when a Registry key is accessed
45 //#######################################
47 class RegistryIOException
: public RegistryException
50 RegistryIOException(long ErrorCode
);
53 //#######################################
54 // Thrown when trying to write to a readonly registry key
55 //#######################################
57 class RegistryNoWriteAccessException
: public RegistryException
60 RegistryNoWriteAccessException(long ErrorCode
);
63 //#######################################
64 // Thrown when trying to access an registry key, with improper
66 //#######################################
68 class RegistryAccessDeniedException
: public RegistryException
71 RegistryAccessDeniedException(long ErrorCode
);
74 //#######################################
75 // A specified registry value could not be read because it is not
77 //#######################################
79 class RegistryValueNotFoundException
: public RegistryException
82 RegistryValueNotFoundException(long ErrorCode
);
85 //#######################################
86 // A specified registry key was not found
87 //#######################################
89 class RegistryKeyNotFoundException
: public RegistryException
92 RegistryKeyNotFoundException(long ErrorCode
);
95 //#######################################
96 // A specified registry operation is invalid
97 //#######################################
99 class RegistryInvalidOperationException
: public RegistryException
102 RegistryInvalidOperationException(long ErrorCode
);
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */