File indexing completed on 2025-01-05 04:46:57

0001 /*
0002     SPDX-FileCopyrightText: 2012 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "exception.h"
0010 
0011 class QSqlQuery;
0012 
0013 namespace Akonadi
0014 {
0015 namespace Server
0016 {
0017 /** Exception for reporting SQL errors. */
0018 class DbException : public Exception
0019 {
0020 public:
0021     explicit DbException(const QSqlQuery &query, const char *what = nullptr);
0022     const char *type() const throw() override;
0023 };
0024 
0025 class DbDeadlockException : public DbException
0026 {
0027 public:
0028     explicit DbDeadlockException(const QSqlQuery &query);
0029 };
0030 
0031 } // namespace Server
0032 } // namespace Akonadi