NotEnoughMemoryException.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  "Not enough memory in the buffer stream";
21 
23  const char* const& message) noexcept
24  : Exception(message)
25 {
26 }
27 
29  const NotEnoughMemoryException& ex) noexcept
30  : Exception(ex)
31 {
32 }
33 
34 #if HAVE_CXX0X
36  NotEnoughMemoryException&& ex) noexcept
37  : Exception(std::move(ex))
38 {
39 }
40 
41 #endif // if HAVE_CXX0X
42 
44  const NotEnoughMemoryException& ex) noexcept
45 {
46  if (this != &ex)
47  {
49  ex);
50  }
51 
52  return *this;
53 }
54 
55 #if HAVE_CXX0X
57  NotEnoughMemoryException&& ex) noexcept
58 {
59  if (this != &ex)
60  {
62  std::move(ex));
63  }
64 
65  return *this;
66 }
67 
68 #endif // if HAVE_CXX0X
69 
71 {
72 }
73 
75 {
76  throw *this;
77 }
This abstract class is used to create exceptions.
Definition: Exception.h:29
This class is thrown as an exception when the buffer's internal memory reachs its size limit...
static Cdr_DllAPI const char *const NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT
Default message used in the library.
Cdr_DllAPI NotEnoughMemoryException & operator=(const NotEnoughMemoryException &ex) noexcept
Assigment operation.
Cdr_DllAPI Exception & operator=(const Exception &ex) noexcept
Assigment operation.
Definition: Exception.cpp:40
virtual Cdr_DllAPI ~NotEnoughMemoryException() noexcept
Default constructor.
Cdr_DllAPI NotEnoughMemoryException(const char *const &message) noexcept
Default constructor.
const T & move(const T &v)
Definition: backward.hpp:394
virtual Cdr_DllAPI void raise() const override
This function throws the object as exception.


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:38