2 * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #include "exception.hpp"
10 #include <common/error.hpp>
14 lttng::ctl::error::error(const std::string
& msg
,
15 lttng_error_code error_code
,
16 const lttng::source_location
& location
) :
17 runtime_error(msg
, location
), _error_code
{ error_code
}
21 lttng::posix_error::posix_error(const std::string
& msg
,
22 unsigned int errno_code
,
23 const lttng::source_location
& location
) :
24 std::system_error(errno_code
, std::generic_category()), lttng::runtime_error(msg
, location
)
28 lttng::runtime_error::runtime_error(const std::string
& msg
,
29 const lttng::source_location
& location
) :
30 std::runtime_error(msg
), source_location(location
)
34 lttng::allocation_failure::allocation_failure(const std::string
& msg
,
35 std::size_t allocation_size_
,
36 const lttng::source_location
& location
) :
37 lttng::runtime_error(msg
, location
), allocation_size(allocation_size_
)
41 lttng::unsupported_error::unsupported_error(const std::string
& msg
,
42 const lttng::source_location
& location
) :
43 lttng::runtime_error(msg
, location
)
47 lttng::communication_error::communication_error(const std::string
& msg
,
48 const lttng::source_location
& location
) :
49 runtime_error(msg
, location
)
53 lttng::protocol_error::protocol_error(const std::string
& msg
,
54 const lttng::source_location
& location
) :
55 communication_error(msg
, location
)
59 lttng::invalid_argument_error::invalid_argument_error(const std::string
& msg
,
60 const lttng::source_location
& location
) :
61 runtime_error(msg
, location
)