ChimeraTK-DeviceAccess  03.18.00
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 
10 namespace 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
ChimeraTK::runtime_error::what
const char * what() const noexcept override
Return the message describing what exactly went wrong.
Definition: Exception.cpp:14
ChimeraTK::runtime_error::runtime_error
runtime_error(std::string message) noexcept
Constructor.
Definition: Exception.cpp:12
ChimeraTK::logic_error::what
const char * what() const noexcept override
Return the message describing what exactly went wrong.
Definition: Exception.cpp:20
ChimeraTK::logic_error::logic_error
logic_error(std::string message) noexcept
Constructor.
Definition: Exception.cpp:18
Exception.h
ChimeraTK
Definition: DummyBackend.h:16