view Exception.hpp @ 7:d6fdca3bf24e

Make sure everything works for MemoryDBLink.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Wed, 22 Aug 2012 01:07:06 +0200
parents a3834af36579
children d7b384b4a834
line wrap: on
line source

#ifndef EXCEPTION_HPP
#define EXCEPTION_HPP

#include <QtCore/QString>

class Exception {

public:
  virtual QString toString() const
  {
    return errorMsg_;
  }


protected:
  Exception(const QString& errorMsg) : errorMsg_(errorMsg) {}
  virtual ~Exception() {}

  void setErrorMsg(QString& errorMsg);
  const QString& errorMsg(QString& errorMsg);

private:
  QString errorMsg_;
};

#endif //EXCEPTION_HPP