Deepsolver
|
The main exception class of the project. More...
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 |
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.
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".
[in] | visitor | The 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.
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.
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.