Xpace
Xpace::Exception Class Reference

#include <exception.h>

Inheritance diagram for Xpace::Exception:
Xpace::Bounds_Error Xpace::CantCreateCollator Xpace::CollatorTermMismatch Xpace::CollatorTermTooLong Xpace::CollatorValueOutOfRange Xpace::Corrupt_Error Xpace::evalBadOperator Xpace::evalCantOpenIndex Xpace::evalCantRegex Xpace::evalInvalidRegex Xpace::evalNoIndex Xpace::File::Cant_Copy Xpace::File_Cant_Close Xpace::File_Cant_Open Xpace::File_Cant_Read Xpace::File_Cant_Write Xpace::File_Corrupt Xpace::IncompatibleType< T > Xpace::IndexList::CantOpen Xpace::IndexList::CantOpenIndex Xpace::Parser_Error Xpace::Store::cantOpen Xpace::Table::cantCreateSource Xpace::Table::cantOpen Xpace::TableSinkToStore::BadCode Xpace::TableSinkToStore::NoDocID Xpace::TranslateNode< LOC >::unknownType Xpace::Unimplemented_Error Xpace::XML_Bad_Value Xpace::XML_Error Xpace::XML_No_Value

Public Member Functions

 Exception ()
 
 Exception (const Exception &)
 
Exceptionoperator= (const Exception &)
 
virtual ~Exception () throw ()
 
bool operator! () const
 
const Exception why () const
 
const char * versionInfo () const
 
const String getTemplate () const
 
String getMessage (const String &templ=String()) const
 Construct an error message. More...
 
const char * what () const throw ()
 

Protected Member Functions

 Exception (const String &templ, const Exception reason=Exception())
 
void addParam (const String &p)
 Add a parameter to this exception The first parameter added will replace '%1' in the template, the second will replace '%2', and so on. More...
 

Friends

class exceptionImpl
 

Detailed Description

Definition at line 28 of file exception.h.

Constructor & Destructor Documentation

Xpace::Exception::Exception ( )
Xpace::Exception::Exception ( const Exception )
virtual Xpace::Exception::~Exception ( )
throw (
)
virtual
Xpace::Exception::Exception ( const String templ,
const Exception  reason = Exception() 
)
protected
Parameters
templconstruct an Exception with this message template
reasoncause for this Exception, if any

Member Function Documentation

Exception& Xpace::Exception::operator= ( const Exception )
bool Xpace::Exception::operator! ( ) const
Returns
true if empty
const Exception Xpace::Exception::why ( ) const
Returns
the exception that caused this one (if any)
const char* Xpace::Exception::versionInfo ( ) const
Returns
the version string for the Xpace libraries
const String Xpace::Exception::getTemplate ( ) const
Returns
English template into which params will be inserted
String Xpace::Exception::getMessage ( const String templ = String()) const

Construct an error message.

Parameters
templthe template into which params will be inserted (I.e., a translation of getTemplate() for this exception) if = String(), use English template
Returns
the translated template with params insterted
const char* Xpace::Exception::what ( ) const
throw (
)
Returns
an English error message with params inserted
void Xpace::Exception::addParam ( const String p)
protected

Add a parameter to this exception The first parameter added will replace '%1' in the template, the second will replace '%2', and so on.

Parameters
pthe param to be added

Referenced by Xpace::CantCreateCollator::CantCreateCollator(), Xpace::CollatorTermMismatch::CollatorTermMismatch(), Xpace::CollatorTermTooLong::CollatorTermTooLong(), and Xpace::CollatorValueOutOfRange::CollatorValueOutOfRange().

Friends And Related Function Documentation

friend class exceptionImpl
friend

Definition at line 88 of file exception.h.


The documentation for this class was generated from the following file:

current as of Wed Jun 10 2026 12:00:06