Deepsolver
|
The exception class for indication user has asked an impossible transaction. More...
Public Types | |
enum | { UnknownPackageName, UnsolvableSat, NoSatSolution, Unmet, NoRequestedPackage } |
Public Member Functions | |
const std::string & | getArg () const |
Returns optional error string argument. | |
int | getCode () const |
Returns an error type code. | |
std::string | getMessage () const |
Returns a single line error description. | |
std::string | getType () const |
Returns a 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 only initialization. | |
virtual | ~TaskException () |
The destructor. |
This exception class indicates any error occurred during package lists for installation/removing calculation due to incorrect user request. It should not be confused with OperationException class which is used for errors irrelevant to an invalid user command. TaskException covers cases caused by invalid user input such as user has asked to install an unknown package or he has asked to install incompatible set of packages. This class contains optional string argument wich meaning depends on particular a error.
TaskException::TaskException | ( | int | code, |
const std::string & | arg | ||
) | [inline] |
[in] | code | An error code |
[in] | arg | A string argument value |
TaskException::TaskException | ( | int | code | ) | [inline] |
[in] | code | The error code |
const std::string& TaskException::getArg | ( | ) | const [inline] |
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 an error occurred.
std::string TaskException::getMessage | ( | ) | const [inline, virtual] |
This method returns a 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 a short string with one or two words describing the error type. For example, this method can return values like "system", "rpm" etc. A value returned by this method usually is used for error message construction.
Implements DeepsolverException.