3 #ifndef GEODE_EXCEPTIONTYPES_H_ 4 #define GEODE_EXCEPTIONTYPES_H_ 27 #include "geode_globals.hpp" 34 #define _GF_EXCEPTION_DEF(x) \ 35 const char _exception_name_##x[] = "apache::geode::client::" #x; \ 37 typedef SharedPtr<x> x##Ptr; \ 38 class CPPCACHE_EXPORT x : public apache::geode::client::Exception { \ 40 x(const char* msg1, const char* msg2 = NULL, bool forceStack = false, \ 41 const ExceptionPtr& cause = NULLPTR) \ 42 : Exception(msg1, msg2, forceStack, cause) {} \ 43 x(const x& other) : Exception(other) {} \ 44 virtual Exception* clone() const { \ 45 return new x(m_message, m_stack, m_cause); \ 48 virtual const char* getName() const { return _exception_name_##x; } \ 49 virtual void raise() { throw * this; } \ 52 x(const CacheableStringPtr& message, const StackTracePtr& stack, \ 53 const ExceptionPtr& cause) \ 54 : Exception(message, stack, cause) {} \ 57 const x& operator=(const x&); \ 70 _GF_EXCEPTION_DEF(AssertionException);
75 _GF_EXCEPTION_DEF(IllegalArgumentException);
80 _GF_EXCEPTION_DEF(IllegalStateException);
85 _GF_EXCEPTION_DEF(CacheExistsException);
90 _GF_EXCEPTION_DEF(CacheXmlException);
94 _GF_EXCEPTION_DEF(TimeoutException);
99 _GF_EXCEPTION_DEF(CacheWriterException);
104 _GF_EXCEPTION_DEF(RegionExistsException);
109 _GF_EXCEPTION_DEF(CacheClosedException);
114 _GF_EXCEPTION_DEF(LeaseExpiredException);
119 _GF_EXCEPTION_DEF(CacheLoaderException);
124 _GF_EXCEPTION_DEF(RegionDestroyedException);
129 _GF_EXCEPTION_DEF(EntryDestroyedException);
134 _GF_EXCEPTION_DEF(NoSystemException);
140 _GF_EXCEPTION_DEF(AlreadyConnectedException);
145 _GF_EXCEPTION_DEF(FileNotFoundException);
150 _GF_EXCEPTION_DEF(InterruptedException);
156 _GF_EXCEPTION_DEF(UnsupportedOperationException);
162 _GF_EXCEPTION_DEF(StatisticsDisabledException);
167 _GF_EXCEPTION_DEF(ConcurrentModificationException);
172 _GF_EXCEPTION_DEF(UnknownException);
177 _GF_EXCEPTION_DEF(ClassCastException);
182 _GF_EXCEPTION_DEF(EntryNotFoundException);
187 _GF_EXCEPTION_DEF(GeodeIOException);
192 _GF_EXCEPTION_DEF(GeodeConfigException);
198 _GF_EXCEPTION_DEF(NullPointerException);
203 _GF_EXCEPTION_DEF(EntryExistsException);
209 _GF_EXCEPTION_DEF(NotConnectedException);
214 _GF_EXCEPTION_DEF(CacheProxyException);
219 _GF_EXCEPTION_DEF(OutOfMemoryException);
225 _GF_EXCEPTION_DEF(NotOwnerException);
230 _GF_EXCEPTION_DEF(WrongRegionScopeException);
235 _GF_EXCEPTION_DEF(BufferSizeExceededException);
240 _GF_EXCEPTION_DEF(RegionCreationFailedException);
245 _GF_EXCEPTION_DEF(FatalInternalException);
251 _GF_EXCEPTION_DEF(DiskFailureException);
257 _GF_EXCEPTION_DEF(DiskCorruptException);
262 _GF_EXCEPTION_DEF(InitFailedException);
267 _GF_EXCEPTION_DEF(ShutdownFailedException);
272 _GF_EXCEPTION_DEF(CacheServerException);
277 _GF_EXCEPTION_DEF(OutOfRangeException);
282 _GF_EXCEPTION_DEF(QueryException);
287 _GF_EXCEPTION_DEF(MessageException);
292 _GF_EXCEPTION_DEF(NotAuthorizedException);
297 _GF_EXCEPTION_DEF(AuthenticationFailedException);
302 _GF_EXCEPTION_DEF(AuthenticationRequiredException);
307 _GF_EXCEPTION_DEF(DuplicateDurableClientException);
312 _GF_EXCEPTION_DEF(CacheListenerException);
316 _GF_EXCEPTION_DEF(CqException);
320 _GF_EXCEPTION_DEF(CqClosedException);
324 _GF_EXCEPTION_DEF(CqQueryException);
328 _GF_EXCEPTION_DEF(CqExistsException);
339 _GF_EXCEPTION_DEF(CqInvalidException);
343 _GF_EXCEPTION_DEF(FunctionExecutionException);
347 _GF_EXCEPTION_DEF(NoAvailableLocatorsException);
351 _GF_EXCEPTION_DEF(AllConnectionsInUseException);
355 _GF_EXCEPTION_DEF(InvalidDeltaException);
359 _GF_EXCEPTION_DEF(KeyNotFoundException);
364 _GF_EXCEPTION_DEF(TransactionException);
370 _GF_EXCEPTION_DEF(RollbackException);
375 _GF_EXCEPTION_DEF(CommitConflictException);
382 _GF_EXCEPTION_DEF(TransactionDataNodeHasDepartedException);
388 _GF_EXCEPTION_DEF(TransactionDataRebalancedException);
393 _GF_EXCEPTION_DEF(PutAllPartialResultException);
403 #define GfErrTypeToException(str, err) \ 405 if (err != GF_NOERR) { \ 406 GfErrTypeThrowException(str, err); \ 413 #endif // GEODE_EXCEPTIONTYPES_H_ Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
void CPPCACHE_EXPORT GfErrTypeThrowException(const char *str, GfErrType err)
Thrown when a version on which delta is based is different than the current version.
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
GfErrType
Error codes returned by Geode C++ interface functions.
Definition: geode_base.hpp:182
This namespace contains all the Geode C++ API classes, enumerations and globals.