2 * Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef BABELTRACE_CPP_COMMON_BT2_LIB_ERROR_HPP
8 #define BABELTRACE_CPP_COMMON_BT2_LIB_ERROR_HPP
18 class LibError : public std::runtime_error
21 explicit LibError(const std::string& msg = "Error") : std::runtime_error {msg}
29 class LibMemoryError : public LibError
32 LibMemoryError() : LibError {"Memory error"}
40 class LibOverflowError : public LibError
43 LibOverflowError() : LibError {"Overflow error"}
50 #endif // BABELTRACE_CPP_COMMON_BT2_LIB_ERROR_HPP