Deepsolver
Public Types | Public Member Functions
Deepsolver::IndexCoreException Class Reference

Indicates repository index manipulation problem. More...

Inheritance diagram for Deepsolver::IndexCoreException:
Deepsolver::AbstractException

List of all members.

Public Types

enum  { DirectoryNotEmpty, CorruptedFile, MissedChecksumFileName, CodeCount }

Public Member Functions

void accept (ExceptionVisitor &visitor) const
 Calls appropriate visitor method.
int getCode () const
 Returns the error code.
std::string getMessage () const
 Returns a single line error description.
const std::string & getParam () const
 Returns the optional string parameter.
std::string getType () const
 Returns a string with short error type designation.
 IndexCoreException (int code)
 The constructor with error code specification.
 IndexCoreException (int code, const std::string &param)
 The constructor with error code and string parameter specification.
virtual ~IndexCoreException ()
 The destructor.

Detailed Description

The instance of this exception is thrown on some index creation or modifications problems such as corrupted file, not empty target directory etc. This exception created as an addition to general exception classes, like SystemException, PkgBackEndException and so on, which can be also thrown during index operations.


Constructor & Destructor Documentation

Deepsolver::IndexCoreException::IndexCoreException ( int  code) [inline]
Parameters:
[in]codeThe error code
Deepsolver::IndexCoreException::IndexCoreException ( int  code,
const std::string &  param 
) [inline]
Parameters:
[in]codeThe error code
[in]argThe string parameter of the problem

Member Function Documentation

void Deepsolver::IndexCoreException::accept ( ExceptionVisitor visitor) const [inline, virtual]

This method performs invocation of corresponding visit() method of the visitor, provided by the reference. You should use it each time, when you want to make particular handling action for various exception types, as it suggested by design pattern "visitor".

Parameters:
[in]visitorThe reference to the visitor

Implements Deepsolver::AbstractException.

int Deepsolver::IndexCoreException::getCode ( ) const [inline]
Returns:
The error code
std::string Deepsolver::IndexCoreException::getMessage ( ) const [virtual]

This method returns a single line string value with error description. Usually it is the value printed to user in the error message. The value should not include error type, since it can be obtained through getType() method.

Returns:
A single line error description

Implements Deepsolver::AbstractException.

const std::string& Deepsolver::IndexCoreException::getParam ( ) const [inline]
Returns:
The additional string parameter
std::string Deepsolver::IndexCoreException::getType ( ) const [inline, virtual]

This method returns a short string with one or two words describing the error type. For example, this method can return values like "system", "back-end" etc. A value returned by this method usually is used for error message construction.

Returns:
A short string with error type designation

Implements Deepsolver::AbstractException.