#include <SpatialException.h>
Public Member Functions | |
SpatialException (const char *what=0, int defIndex=1) throw () | |
SpatialException (const char *context, const char *because, int defIndex=1) throw () | |
SpatialException (const SpatialException &) throw () | |
Copy constructor. | |
SpatialException & | operator= (const SpatialException &) throw () |
Assignment operator. | |
virtual | ~SpatialException () throw () |
Destructor. | |
virtual const char * | what () const throw () |
Returns the message as set during construction. | |
int | slen (const char *) const |
return string length also for null strings | |
void | clear () |
deallocate string | |
Static Public Attributes | |
static const char * | defaultstr [] |
default error string | |
Protected Attributes | |
char * | str_ |
error string to assemble |
HTM SpatialIndex Exception base class This is the base class for all Science Archive exceptions. It may be used as a generic exception, but programmers are encouraged to use the more specific derived classes. Note that all Spatial exceptions are also Standard Library exceptions by inheritance.
SpatialException::SpatialException | ( | const char * | what = 0 , |
|
int | defIndex = 1 | |||
) | throw () |
Default and explicit constructor. The default constructor supplies a generic message indicating the exception type. The explicit constructor sets the message to a copy of the provided string. This behavior is shared by all derived classes.
References CONTEXT.
SpatialException::SpatialException | ( | const char * | context, | |
const char * | because, | |||
int | defIndex = 1 | |||
) | throw () |
Standard constructor. The message is assembled from copies of the two component strings. The first indicates where in the program the exception was thrown, and the second indicates why. The null pointer is used to select standard components according to the type of the exception. This behavior is shared by all derived classes.
References CONTEXT.
SpatialException::SpatialException | ( | const SpatialException & | oldX | ) | throw () |
Copy constructor.
SpatialException::~SpatialException | ( | ) | throw () [virtual] |
Destructor.
References str_.
void SpatialException::clear | ( | ) |
deallocate string
References str_.
SpatialException & SpatialException::operator= | ( | const SpatialException & | oldX | ) | throw () |
Assignment operator.
int SpatialException::slen | ( | const char * | str | ) | const |
return string length also for null strings
const char * SpatialException::what | ( | ) | const throw () [virtual] |
Returns the message as set during construction.
References str_.
const char * SpatialException::defaultstr [static] |
{ "SDSS Science Archive", "generic exception", "unimplemented functionality", "failed operation", "array bounds violation", "interface violation" }
default error string
char* SpatialException::str_ [protected] |
error string to assemble
Referenced by clear(), what(), and ~SpatialException().