Deepsolver
Public Member Functions
Deepsolver::AbstractException Class Reference

The main exception class of the project. More...

Inheritance diagram for Deepsolver::AbstractException:
Deepsolver::CliParserException Deepsolver::ConfigException Deepsolver::ConfigFileException Deepsolver::CurlException Deepsolver::GzipException Deepsolver::IndexCoreException Deepsolver::InfoFileSyntaxException Deepsolver::InfoFileValueException Deepsolver::Md5FileException Deepsolver::NotImplementedException Deepsolver::OperationCoreException Deepsolver::PkgBackEndException Deepsolver::RegExpException Deepsolver::SystemException Deepsolver::TaskException

List of all members.

Public Member Functions

 AbstractException ()
 The default constructor.
virtual void accept (ExceptionVisitor &visitor) const =0
 Calls appropriate visitor method.
virtual std::string getMessage () const =0
 Returns a single line error description.
virtual std::string getType () const =0
 Returns a string with short error type designation.
virtual ~AbstractException ()
 the destructor

Detailed Description

Every exception class, used for error indication in Deepsolver project, must be a descendant (not exactly direct) of this AbstractException class. It is created to simplify and unify error handling. The main information provided by this class is the an error type designation and a single line description.

See also:
ExceptionVisitor

Member Function Documentation

virtual void Deepsolver::AbstractException::accept ( ExceptionVisitor visitor) const [pure 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

Implemented in Deepsolver::NotImplementedException, Deepsolver::PkgBackEndException, Deepsolver::Md5FileException, Deepsolver::RegExpException, Deepsolver::CurlException, Deepsolver::GzipException, Deepsolver::InfoFileValueException, Deepsolver::InfoFileSyntaxException, Deepsolver::ConfigException, Deepsolver::ConfigFileException, Deepsolver::IndexCoreException, Deepsolver::OperationCoreException, Deepsolver::TaskException, Deepsolver::SystemException, and Deepsolver::CliParserException.

virtual std::string Deepsolver::AbstractException::getMessage ( ) const [pure 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

Implemented in Deepsolver::NotImplementedException, Deepsolver::PkgBackEndException, Deepsolver::Md5FileException, Deepsolver::RegExpException, Deepsolver::CurlException, Deepsolver::GzipException, Deepsolver::InfoFileValueException, Deepsolver::InfoFileSyntaxException, Deepsolver::ConfigException, Deepsolver::ConfigFileException, Deepsolver::IndexCoreException, Deepsolver::OperationCoreException, Deepsolver::TaskException, Deepsolver::SystemException, and Deepsolver::CliParserException.

virtual std::string Deepsolver::AbstractException::getType ( ) const [pure 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

Implemented in Deepsolver::NotImplementedException, Deepsolver::PkgBackEndException, Deepsolver::Md5FileException, Deepsolver::RegExpException, Deepsolver::CurlException, Deepsolver::GzipException, Deepsolver::InfoFileValueException, Deepsolver::InfoFileSyntaxException, Deepsolver::ConfigException, Deepsolver::ConfigFileException, Deepsolver::IndexCoreException, Deepsolver::OperationCoreException, Deepsolver::TaskException, Deepsolver::SystemException, and Deepsolver::CliParserException.