Deepsolver
Public Types | Public Member Functions
IndexCoreException Class Reference

Indicates repository index manipulation problem. More...

Inheritance diagram for IndexCoreException:
DeepsolverException

List of all members.

Public Types

enum  { InternalIOProblem = 0, DirectoryNotEmpty = 1, CorruptedFile = 2, MissedChecksumFileName = 3 }

Public Member Functions

const std::string & getArg () const
 Returns the additional string argument.
int getCode () const
 Returns the error code.
std::string getMessage () const
 Returns the single line error description.
std::string getType () const
 Returns the string with error type.
 IndexCoreException (int code)
 The constructor with error code specification.
 IndexCoreException (int code, const std::string &arg)
 The constructor with error code and string argument specification.
virtual ~IndexCoreException ()
 The destructor.

Detailed Description

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

See also:
IndexCore SystemException RpmException Md5FileException

Constructor & Destructor Documentation

IndexCoreException::IndexCoreException ( int  code) [inline]
Parameters:
[in]codeThe error code of error occurred
IndexCoreException::IndexCoreException ( int  code,
const std::string &  arg 
) [inline]
Parameters:
[in]codeThe error code of problem occurred
[in]argThe string argument for problem type

Member Function Documentation

const std::string& IndexCoreException::getArg ( ) const [inline]

Use this method to get additional string argument of the problem occurred.

Returns:
The additional string argument
int IndexCoreException::getCode ( ) const [inline]

Use this method to get error code value.

Returns:
The error code value
std::string IndexCoreException::getMessage ( ) const [inline, virtual]

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

Returns:
The single line error description

Implements DeepsolverException.

std::string IndexCoreException::getType ( ) const [inline, virtual]

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

Returns:
The short string with error type description

Implements DeepsolverException.