Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire::Exception Class Reference

A description of an exception that occurred during a cache operation. More...

Inherits gemfire::SharedBase.

Inherited by gemfire::AllConnectionsInUseException, gemfire::AlreadyConnectedException, gemfire::AssertionException, gemfire::AuthenticationFailedException, gemfire::AuthenticationRequiredException, gemfire::BufferSizeExceededException, gemfire::CacheClosedException, gemfire::CacheExistsException, gemfire::CacheListenerException, gemfire::CacheLoaderException, gemfire::CacheProxyException, gemfire::CacheServerException, gemfire::CacheWriterException, gemfire::CacheXmlException, gemfire::ClassCastException, gemfire::CommitConflictException, gemfire::ConcurrentModificationException, gemfire::CqClosedException, gemfire::CqException, gemfire::CqExistsException, gemfire::CqInvalidException, gemfire::CqQueryException, gemfire::DiskCorruptException, gemfire::DiskFailureException, gemfire::DuplicateDurableClientException, gemfire::EntryDestroyedException, gemfire::EntryExistsException, gemfire::EntryNotFoundException, gemfire::FatalInternalException, gemfire::FileNotFoundException, gemfire::FunctionExecutionException, gemfire::GemfireConfigException, gemfire::GemfireIOException, gemfire::IllegalArgumentException, gemfire::IllegalStateException, gemfire::InitFailedException, gemfire::InterruptedException, gemfire::InvalidDeltaException, gemfire::KeyNotFoundException, gemfire::LeaseExpiredException, gemfire::MessageException, gemfire::NoAvailableLocatorsException, gemfire::NoSystemException, gemfire::NotAuthorizedException, gemfire::NotConnectedException, gemfire::NotOwnerException, gemfire::NullPointerException, gemfire::OutOfMemoryException, gemfire::OutOfRangeException, gemfire::PutAllPartialResultException, gemfire::QueryException, gemfire::RegionCreationFailedException, gemfire::RegionDestroyedException, gemfire::RegionExistsException, gemfire::RollbackException, gemfire::ShutdownFailedException, gemfire::StatisticsDisabledException, gemfire::TimeoutException, gemfire::TransactionDataNodeHasDepartedException, gemfire::TransactionDataRebalancedException, gemfire::TransactionException, gemfire::UnknownException, gemfire::UnsupportedOperationException, and gemfire::WrongRegionScopeException.

Public Member Functions

virtual Exceptionclone () const
 Create a clone of this exception. More...
 
 Exception (const char *msg1, const char *msg2=NULL, bool forceTrace=false, const ExceptionPtr &cause=gemfire::NullSharedBase::s_instancePtr)
 public methods More...
 
 Exception (const Exception &other)
 Creates an exception as a copy of the given other exception. More...
 
virtual const char * getMessage () const
 Returns the message pointer. More...
 
virtual const char * getName () const
 Return the name of this exception type. More...
 
virtual size_t getStackTrace (char *buffer, size_t maxLength) const
 On some platforms, get a stacktrace string from the location the exception was created. More...
 
void preserveSB () const
 Atomically increment reference count. More...
 
virtual void printStackTrace () const
 On some platforms, print a stacktrace from the location the exception was created. More...
 
virtual void raise ()
 Throw polymorphically; this allows storing an exception object pointer and throwing it later. More...
 
int32_t refCount ()
 
void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More...
 
virtual void showMessage () const
 Show the message pointer. More...
 
virtual ~Exception ()
 destructor More...
 

Protected Member Functions

 Exception (const CacheableStringPtr &message, const StackTracePtr &stack, const ExceptionPtr &cause)
 internal constructor used to clone this exception More...
 

Detailed Description

A description of an exception that occurred during a cache operation.

Constructor & Destructor Documentation

gemfire::Exception::Exception ( const char *  msg1,
const char *  msg2 = NULL,
bool  forceTrace = false,
const ExceptionPtr cause = gemfire::NullSharedBase::s_instancePtr 
)

public methods

Creates an exception.

Parameters
msg1message pointer, this is copied into the exception.
msg2optional extra message pointer, appended to msg1.
forceTraceenables a stacktrace for this exception regardless of stacktrace-enabled system property.
causeoptional cause of the exception which can be later retrieved using getCause
gemfire::Exception::Exception ( const Exception other)

Creates an exception as a copy of the given other exception.

Parameters
otherthe original exception.
virtual gemfire::Exception::~Exception ( )
virtual

destructor

gemfire::Exception::Exception ( const CacheableStringPtr message,
const StackTracePtr stack,
const ExceptionPtr cause 
)
protected

internal constructor used to clone this exception

Member Function Documentation

virtual Exception* gemfire::Exception::clone ( ) const
virtual

Create a clone of this exception.

virtual const char* gemfire::Exception::getMessage ( ) const
virtual

Returns the message pointer.

Returns
message pointer
virtual const char* gemfire::Exception::getName ( ) const
virtual

Return the name of this exception type.

virtual size_t gemfire::Exception::getStackTrace ( char *  buffer,
size_t  maxLength 
) const
virtual

On some platforms, get a stacktrace string from the location the exception was created.

void gemfire::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

virtual void gemfire::Exception::printStackTrace ( ) const
virtual

On some platforms, print a stacktrace from the location the exception was created.

virtual void gemfire::Exception::raise ( )
inlinevirtual

Throw polymorphically; this allows storing an exception object pointer and throwing it later.

int32_t gemfire::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void gemfire::SharedBase::releaseSB ( ) const
inherited

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.

virtual void gemfire::Exception::showMessage ( ) const
virtual

Show the message pointer.


GemFire C++ Cache API Documentation