2 * Copyright (c) 2022 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef BABELTRACE_CPP_COMMON_BT2C_EXC_HPP
8 #define BABELTRACE_CPP_COMMON_BT2C_EXC_HPP
20 class End : public std::exception
23 explicit End() noexcept : std::exception {}
31 class Error : public std::runtime_error
34 explicit Error(std::string msg = "Error") : std::runtime_error {std::move(msg)}
42 class OverflowError : public Error
45 explicit OverflowError() noexcept : Error {"Overflow error"}
53 class MemoryError : public std::bad_alloc
56 explicit MemoryError() noexcept : std::bad_alloc {}
62 * Not available right now: try again later.
64 class TryAgain : public std::exception
67 explicit TryAgain() noexcept : std::exception {}
73 * No such file or directory.
75 class NoSuchFileOrDirectoryError : public Error
78 explicit NoSuchFileOrDirectoryError() noexcept : Error {"No such file or directory"}
83 } /* namespace bt2c */
85 #endif /* BABELTRACE_CPP_COMMON_BT2C_EXC_HPP */