Coverage Report

Created: 2026-10-28 07:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/Fast-CDR/src/cpp/exceptions/NotEnoughMemoryException.cpp
Line
Count
Source
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
15
#include <fastcdr/exceptions/NotEnoughMemoryException.h>
16
17
using namespace eprosima::fastcdr::exception;
18
19
const char* const NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT =
20
        "Not enough memory in the buffer stream";
21
22
NotEnoughMemoryException::NotEnoughMemoryException(
23
        const char* const& message) noexcept
24
46.3k
    : Exception(message)
25
46.3k
{
26
46.3k
}
27
28
NotEnoughMemoryException::NotEnoughMemoryException(
29
        const NotEnoughMemoryException& ex) noexcept
30
2.99k
    : Exception(ex)
31
2.99k
{
32
2.99k
}
33
34
NotEnoughMemoryException::NotEnoughMemoryException(
35
        NotEnoughMemoryException&& ex) noexcept
36
0
    : Exception(std::move(ex))
37
0
{
38
0
}
39
40
NotEnoughMemoryException& NotEnoughMemoryException::operator =(
41
        const NotEnoughMemoryException& ex) noexcept
42
0
{
43
0
    if (this != &ex)
44
0
    {
45
0
        Exception::operator =(
46
0
                ex);
47
0
    }
48
49
0
    return *this;
50
0
}
51
52
NotEnoughMemoryException& NotEnoughMemoryException::operator =(
53
        NotEnoughMemoryException&& ex) noexcept
54
0
{
55
0
    if (this != &ex)
56
0
    {
57
0
        Exception::operator =(
58
0
                std::move(ex));
59
0
    }
60
61
0
    return *this;
62
0
}
63
64
NotEnoughMemoryException::~NotEnoughMemoryException() noexcept
65
49.3k
{
66
49.3k
}
67
68
void NotEnoughMemoryException::raise() const
69
2.99k
{
70
2.99k
    throw *this;
71
2.99k
}