1 #ifndef gamgee__exceptions__guard
2 #define gamgee__exceptions__guard
4 #include <boost/format.hpp>
17 std::runtime_error{std::string{
"Could not open file "} + filename} {}
26 std::runtime_error{std::string{
"Could not open index for file "} + filename} {}
35 std::runtime_error{std::string{
"Could not read header for file "} + filename} {}
44 std::runtime_error(
std::string{
"Incompatible headers: "} + reason) { }
53 std::runtime_error{(boost::format(
"Error: single input required, but vector %s has size %d") % vector_name % size).
str()} { }
62 std::runtime_error{(boost::format(
"Error: htslib failed with error code %d. See stderr for details.") % error_code).
str()} { }
71 std::runtime_error{(boost::format(
"Error: chromosome %s was not found in the given reference") % chrom_name).
str()} { }
80 std::runtime_error{(boost::format(
"Error: chromosome %s is of size %d but location %d was requested") % chrom_name % chrom_size % desired_location).
str()} { }
85 #endif // end of gamgee__exceptions__guard
HtslibException(const int error_code)
Definition: exceptions.h:61
FileOpenException(const std::string &filename)
Definition: exceptions.h:16
an exception class for the case where a chromosome is not found in the reference
Definition: exceptions.h:68
Exception for the case where there is an error opening a file for reading/writing.
Definition: exceptions.h:14
ChromosomeSizeException(const std::string &chrom_name, const size_t chrom_size, const int desired_location)
Definition: exceptions.h:79
ChromosomeNotFoundException(const std::string &chrom_name)
Definition: exceptions.h:70
#define str(x)
Definition: sam.c:66
an exception class for the case where a chromosome is not found in the reference
Definition: exceptions.h:77
Definition: exceptions.h:9
Exception for the case where an index file cannot be opened for a particular file (eg...
Definition: exceptions.h:23
a catchall exception class for htslib errors
Definition: exceptions.h:59
IndexLoadException(const std::string &filename)
Definition: exceptions.h:25