Sqlite: Cleanup exceptions

Change-Id: Id5ac7e6aba407eb5a3164bba57bff043e809beef
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2017-07-26 16:38:21 +02:00
parent 3dcce060b2
commit e562cc3f68
4 changed files with 15 additions and 15 deletions

View File

@@ -27,20 +27,25 @@
#include "sqliteglobal.h"
#include <QByteArray>
#include <utils/smallstring.h>
namespace Sqlite {
class SQLITE_EXPORT SqliteException
{
public:
SqliteException(const char *m_whatErrorHasHappen, const char *sqliteErrorMessage = 0);
SqliteException(Utils::SmallString &&whatErrorHasHappen,
Utils::SmallString &&sqliteErrorMessage = Utils::SmallString())
: m_whatErrorHasHappen(std::move(whatErrorHasHappen)),
m_sqliteErrorMessage(std::move(sqliteErrorMessage))
{
}
void printWarning() const;
private:
const char *m_whatErrorHasHappen;
QByteArray m_sqliteErrorMessage;
Utils::SmallString m_whatErrorHasHappen;
Utils::SmallString m_sqliteErrorMessage;
};
} // namespace Sqlite