SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
io/exception.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <ios>
13#include <stdexcept>
14
16
17namespace seqan3
18{
19
20// ----------------------------------------------------------------------------
21// file open exceptions
22// ----------------------------------------------------------------------------
23
32
41
50
54{
55#if SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI
56 // std::ios_base::failure is missing the std::error_code constructor in pre-C++11 ABI
57 // see https://en.cppreference.com/w/cpp/io/ios_base/failure
58 using base_t = std::ios_base::failure;
59 using base_t::base_t;
60#else // ^^^ workaround / no workaround vvv
62 explicit io_error(std::string const & s, std::error_code const & ec = std::io_errc::stream) :
64 {}
65#endif // SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI
66};
67
68// ----------------------------------------------------------------------------
69// parse exceptions
70// ----------------------------------------------------------------------------
71
80
81// ----------------------------------------------------------------------------
82// write exceptions
83// ----------------------------------------------------------------------------
84
93
94} // namespace seqan3
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
SeqAn specific customisations in the standard namespace.
Provides platform and dependency checks.
Thrown if there is an unspecified filesystem or stream error while opening, e.g. permission problem.
Definition io/exception.hpp:36
file_open_error(std::string const &s)
Constructor that forwards the exception string.
Definition io/exception.hpp:38
Thrown if information given to output format didn't match expectations.
Definition io/exception.hpp:88
format_error(std::string const &s)
Constructor that forwards the exception string.
Definition io/exception.hpp:90
Thrown if there is an io error in low level io operations such as in std::basic_streambuf operations.
Definition io/exception.hpp:54
Thrown if there is a parse error, such as reading an unexpected character from an input stream.
Definition io/exception.hpp:45
parse_error(std::string const &s)
Constructor that forwards the exception string.
Definition io/exception.hpp:47
Thrown if I/O was expecting more input (e.g. a delimiter or a new line), but the end of input was rea...
Definition io/exception.hpp:75
unexpected_end_of_input(std::string const &s)
Constructor that forwards the exception string.
Definition io/exception.hpp:77
Thrown if there is no format that accepts a given file extension.
Definition io/exception.hpp:27
unhandled_extension_error(std::string const &s)
Constructor that forwards the exception string.
Definition io/exception.hpp:29
Hide me