Exception.cpp
Go to the documentation of this file.
1 // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
16 
17 using namespace eprosima::fastcdr::exception;
18 
20  const char* const& message) noexcept
21  : m_message(message)
22 {
23 }
24 
26  const Exception& ex) noexcept
27  : m_message(ex.m_message)
28 {
29 }
30 
32  Exception&& ex) noexcept
33  : m_message(std::move(ex.m_message))
34 {
35 }
36 
38  const Exception& ex) noexcept
39 {
40  m_message = ex.m_message;
41  return *this;
42 }
43 
45  Exception&& ex) noexcept
46 {
47  m_message = std::move(ex.m_message);
48  return *this;
49 }
50 
52 {
53 }
54 
55 const char* Exception::what() const noexcept
56 {
57  return m_message;
58 }
eprosima::fastcdr::exception::Exception::what
virtual const Cdr_DllAPI char * what() const noexcept override
This function returns the error message.
Definition: Exception.cpp:55
Exception.h
backward::details::move
const T & move(const T &v)
Definition: backward.hpp:394
eprosima::fastcdr::exception::Exception::operator=
Cdr_DllAPI Exception & operator=(const Exception &ex) noexcept
Assigment operation.
Definition: Exception.cpp:37
eprosima::fastcdr::exception::Exception
This abstract class is used to create exceptions.
Definition: Exception.h:29
eprosima::fastcdr::exception::Exception::Exception
Cdr_DllAPI Exception(const char *const &message) noexcept
Default constructor.
Definition: Exception.cpp:19
eprosima::fastcdr::exception::Exception::~Exception
virtual Cdr_DllAPI ~Exception() noexcept
Default destructor.
Definition: Exception.cpp:51
eprosima::fastcdr::exception
Definition: BadOptionalAccessException.hpp:22
eprosima::fastcdr::exception::Exception::m_message
const char * m_message
Definition: Exception.h:90


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44