#ifndef VALIDATIONEXCEPTION_H
#define VALIDATIONEXCEPTION_H

#include <exception>
#include <QString>

class ValidationException : public std::exception
{
public:
    ValidationException(const QString &fieldName, const QString &msg)
        :fieldName(fieldName)
        ,message(msg){};
    ~ValidationException() throw() {};

    virtual const char* what() const throw () {
        return "ValidationException";
    }

    QString getFieldName() const {return fieldName;};
    QString getMessage() const {return message;};

private:
    QString fieldName;
    QString message;
};

#endif // VALIDATIONEXCEPTION_H
