pica/database/exceptions.h

35 lines
696 B
C
Raw Normal View History

2023-12-30 22:42:11 +00:00
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
2023-12-22 23:25:20 +00:00
#pragma once
2023-12-29 17:40:00 +00:00
#include <string>
#include <stdexcept>
2023-12-22 23:25:20 +00:00
2023-12-29 17:40:00 +00:00
namespace DB {
class Duplicate : public std::runtime_error {
2023-12-22 23:25:20 +00:00
public:
explicit Duplicate(const std::string& text);
};
2023-12-29 17:40:00 +00:00
class DuplicateLogin : public Duplicate {
2023-12-22 23:25:20 +00:00
public:
explicit DuplicateLogin(const std::string& text);
};
2023-12-29 17:40:00 +00:00
class EmptyResult : public std::runtime_error {
2023-12-22 23:25:20 +00:00
public:
explicit EmptyResult(const std::string& text);
};
2023-12-29 17:40:00 +00:00
class NoLogin : public EmptyResult {
2023-12-22 23:25:20 +00:00
public:
explicit NoLogin(const std::string& text);
};
class NoSession : public EmptyResult {
public:
explicit NoSession(const std::string& text);
};
2023-12-29 17:40:00 +00:00
}