Program Listing for File exceptions.hpp¶
↰ Return to documentation for file (fwdpp/ts/exceptions.hpp)
#ifndef FWDPP_TS_EXCEPTIONS_HPP
#define FWDPP_TS_EXCEPTIONS_HPP
#include <string>
#include <stdexcept>
namespace fwdpp
{
namespace ts
{
class tables_error : public std::exception
{
private:
std::string message_;
public:
explicit tables_error(std::string message)
: message_(std::move(message))
{
}
virtual const char*
what() const noexcept
{
return message_.c_str();
}
};
class samples_error : public std::exception
{
private:
std::string message_;
public:
explicit samples_error(std::string message)
: message_(std::move(message))
{
}
virtual const char*
what() const noexcept
{
return message_.c_str();
}
};
} // namespace ts
} // namespace fwdpp
#endif