ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
Exception.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include <exception>
6#include <string>
7
8namespace ChimeraTK {
9
18 class runtime_error : public std::exception {
19 public:
24 explicit runtime_error(std::string message) noexcept;
25
31 [[nodiscard]] const char* what() const noexcept override;
32
33 private:
34 std::string _message;
35 };
36
51 class logic_error : public std::exception {
52 public:
57 explicit logic_error(std::string message) noexcept;
58
64 [[nodiscard]] const char* what() const noexcept override;
65
66 private:
67 std::string _message;
68 };
69
70} // namespace ChimeraTK
Exception thrown when a logic error has occured.
Definition Exception.h:51
const char * what() const noexcept override
Return the message describing what exactly went wrong.
Definition Exception.cpp:20
Exception thrown when a runtime error has occured.
Definition Exception.h:18
const char * what() const noexcept override
Return the message describing what exactly went wrong.
Definition Exception.cpp:14