SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
exception.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
15 #include <ios>
16 #include <stdexcept>
17 
18 #include <seqan3/core/platform.hpp>
19 
20 namespace seqan3
21 {
22 
26 // ----------------------------------------------------------------------------
27 // file open exceptions
28 // ----------------------------------------------------------------------------
29 
32 {
35  {}
36 };
37 
40 {
43  {}
44 };
45 
48 {
51  {}
52 };
53 
56 {
58  io_error(std::string const & s,
59  std::error_code const & ec) : std::ios_base::failure{s, ec}
60  {}
61 
63  explicit io_error(std::string const & s) : io_error{s, std::error_code{std::io_errc::stream}}
64  {}
65 };
66 
67 // ----------------------------------------------------------------------------
68 // parse exceptions
69 // ----------------------------------------------------------------------------
70 
73 {
76  {}
77 };
78 
79 // ----------------------------------------------------------------------------
80 // write exceptions
81 // ----------------------------------------------------------------------------
82 
85 {
88  {}
89 };
90 
92 
93 }
seqan3::unhandled_extension_error
Thrown if there is no format that accepts a given file extension.
Definition: exception.hpp:31
std::string
seqan3::unexpected_end_of_input
Thrown if I/O was expecting more input (e.g. a delimiter or a new line), but the end of input was rea...
Definition: exception.hpp:72
seqan3::format_error
Thrown if information given to output format didn't match expectations.
Definition: exception.hpp:84
seqan3::io_error::io_error
io_error(std::string const &s)
Constructor that forwards the exception string.
Definition: exception.hpp:63
std::ios_base::failure
seqan3::unhandled_extension_error::unhandled_extension_error
unhandled_extension_error(std::string const &s)
Constructor that forwards the exception string.
Definition: exception.hpp:34
seqan3::io_error
Thrown if there is an io error in low level io operations such as in std::basic_streambuf operations.
Definition: exception.hpp:55
seqan3::io_error::io_error
io_error(std::string const &s, std::error_code const &ec)
Constructor that forwards the exception string.
Definition: exception.hpp:58
std::error_code
seqan3::parse_error::parse_error
parse_error(std::string const &s)
Constructor that forwards the exception string.
Definition: exception.hpp:50
stdexcept
seqan3::parse_error
Thrown if there is a parse error, such as reading an unexpected character from an input stream.
Definition: exception.hpp:47
seqan3
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:36
std::runtime_error
std::invalid_argument
seqan3::unexpected_end_of_input::unexpected_end_of_input
unexpected_end_of_input(std::string const &s)
Constructor that forwards the exception string.
Definition: exception.hpp:75
platform.hpp
Provides platform and dependency checks.
std
SeqAn specific customisations in the standard namespace.
ios
seqan3::file_open_error
Thrown if there is an unspecified filesystem or stream error while opening, e.g. permission problem.
Definition: exception.hpp:39
seqan3::format_error::format_error
format_error(std::string const &s)
Constructor that forwards the exception string.
Definition: exception.hpp:87
seqan3::file_open_error::file_open_error
file_open_error(std::string const &s)
Constructor that forwards the exception string.
Definition: exception.hpp:42