sessiond: introduce ltt_session::locked_ref look-up functions
[lttng-tools.git] / src / common / exception.cpp
1 /*
2 * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #include "exception.hpp"
9
10 #include <common/error.hpp>
11
12 #include <sstream>
13
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 }
18 {
19 }
20
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)
26 {
27 }
28
29 lttng::runtime_error::runtime_error(const std::string& msg,
30 const lttng::source_location& location) :
31 std::runtime_error(msg), source_location(location)
32 {
33 }
34
35 lttng::allocation_failure::allocation_failure(const std::string& msg,
36 std::size_t allocation_size_,
37 const lttng::source_location& location) :
38 lttng::runtime_error(msg, location), allocation_size(allocation_size_)
39 {
40 }
41
42 lttng::unsupported_error::unsupported_error(const std::string& msg,
43 const lttng::source_location& location) :
44 lttng::runtime_error(msg, location)
45 {
46 }
47
48 lttng::communication_error::communication_error(const std::string& msg,
49 const lttng::source_location& location) :
50 runtime_error(msg, location)
51 {
52 }
53
54 lttng::protocol_error::protocol_error(const std::string& msg,
55 const lttng::source_location& location) :
56 communication_error(msg, location)
57 {
58 }
59
60 lttng::invalid_argument_error::invalid_argument_error(const std::string& msg,
61 const lttng::source_location& location) :
62 runtime_error(msg, location)
63 {
64 }
This page took 0.031182 seconds and 4 git commands to generate.