Commit d7f9af8f authored by Lukas Appelhans's avatar Lukas Appelhans

Docu

parent b1a45315
......@@ -18,9 +18,19 @@ namespace Akabei {
class Package;
class Operation;
/**
* \class Error Akabei/Error
*
* \brief Class for describing an error which occurred.
*/
class Error
{
public:
/**
* \enum Type
* This enum describes the type of error which occurred.
* @see type()
*/
enum Type {
UnknownError = 0,
FilesystemConflictError = 1,
......@@ -34,18 +44,51 @@ class Error
AkabeiInternalError = 129
};
/**
* Creates an new error object.
* @param type the type of the error
* @param description the description of the error
* @param op the operation associated with the error
*/
explicit Error(Type type, const QString &description = QString(), Operation *op = 0);
virtual ~Error();
/**
* @returns the type of error which occurred
*/
Type type() const;
/**
* @returns the description of the error
*/
QString description() const;
/**
* Sets a new description of the error.
* @param description the new description
*/
void setDescription(const QString &description);
/**
* @returns the operation in which the error occurred. Can theoretically be 0.
*/
Operation *operation();
/**
* Sets a new operation associated with the error
* @param op the new operation associated with the error
*/
void setOperation(Operation *op);
/**
* @returns the targets which are associated with the error
*/
QList<Package*> targets() const;
/**
* Sets new targets associated with the error
* @param targets the new targets associated with the error
*/
void setTargets(const QList<Package*> &targets);
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment