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()),
25 lttng::runtime_error(msg
, location
)
29 lttng::runtime_error::runtime_error(const std::string
& msg
,
30 const lttng::source_location
& location
) :
31 std::runtime_error(msg
), source_location(location
)
35 lttng::unsupported_error::unsupported_error(const std::string
& msg
,
36 const lttng::source_location
& location
) :
37 lttng::runtime_error(msg
, location
)
41 lttng::communication_error::communication_error(const std::string
& msg
,
42 const lttng::source_location
& location
) :
43 runtime_error(msg
, location
)
47 lttng::protocol_error::protocol_error(const std::string
& msg
,
48 const lttng::source_location
& location
) :
49 communication_error(msg
, location
)
53 lttng::invalid_argument_error::invalid_argument_error(const std::string
& msg
,
54 const lttng::source_location
& location
) :
55 runtime_error(msg
, location
)