Deepsolver
|
The class for indication user has asked impossible task. More...
Public Types | |
enum | { UnknownPackageName = 0, UnsolvableSat = 1, NoSatSolution = 2, Unmet = 3, NoRequestedPackage = 4 } |
Public Member Functions | |
const std::string & | getArg () const |
Returns the optional error string argument. | |
int | getCode () const |
Returns the error type code. | |
std::string | getMessage () const |
Returns the single line error description. | |
std::string | getType () const |
Returns the string with error type. | |
TaskException (int code, const std::string &arg) | |
The constructor with error type and string argument initialization. | |
TaskException (int code) | |
The constructor with error type initialization. | |
virtual | ~TaskException () |
The destructor. |
package lists generating work. It should not be confused with OperationException class which is used for system or repository problems occurred in transaction. In most cases TaskException indicates errors caused by invalid user input such as user has asked to install unknown package or he has asked to install incompatible set of packages. This class contains optional string argument for various error types. Its meaning depends on particular error.
TaskException::TaskException | ( | int | code, |
const std::string & | arg | ||
) | [inline] |
[in] | code | The error code |
[in] | arg | The string argument value |
TaskException::TaskException | ( | int | code | ) | [inline] |
[in] | code | The error code |
const std::string& TaskException::getArg | ( | ) | const [inline] |
The purpose of this argument depends on error code. It is optional, so not every of the possible task errors must has non-empty string argument.
int TaskException::getCode | ( | ) | const [inline] |
Use this method to get code of the error occurred.
std::string TaskException::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.
Implements DeepsolverException.
std::string TaskException::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.
Implements DeepsolverException.