aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/sqlite/sqlstatementbuilderexception.h
blob: e5ad187f4bc68672637485009485e0cf28598d45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "sqliteexception.h"

namespace Sqlite {

class SQLITE_EXPORT SqlStatementBuilderException : public ExceptionWithMessage
{
public:
    SqlStatementBuilderException(const char *whatHasHappened,
                                 Utils::SmallString &&sqliteErrorMessage)
        : ExceptionWithMessage(std::move(sqliteErrorMessage))
        , m_whatHasHappened{whatHasHappened}
    {}

    const char *what() const noexcept override;

private:
    const char *m_whatHasHappened;
};

} // namespace Sqlite