ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
Exception.cpp
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
4#include "Exception.h"
5
6#include <iostream>
7#include <string>
8#include <utility>
9
10namespace ChimeraTK {
11
12 runtime_error::runtime_error(std::string message) noexcept : _message(std::move(message)) {}
13
14 const char* runtime_error::what() const noexcept {
15 return _message.c_str();
16 }
17
18 logic_error::logic_error(std::string message) noexcept : _message(std::move(message)) {}
19
20 const char* logic_error::what() const noexcept {
21 return _message.c_str();
22 }
23
24} // namespace ChimeraTK
const char * what() const noexcept override
Return the message describing what exactly went wrong.
Definition Exception.cpp:20
logic_error(std::string message) noexcept
Constructor.
Definition Exception.cpp:18
runtime_error(std::string message) noexcept
Constructor.
Definition Exception.cpp:12
const char * what() const noexcept override
Return the message describing what exactly went wrong.
Definition Exception.cpp:14