#include "posexcept.hh" #include using namespace std ; bad_direction::bad_direction(const char _direction) throw(): direction(_direction) {} const char* bad_direction::what() const throw() { ostringstream message ; message << "`" << static_cast(direction) << "` is not a valid direction value!" ; return message.str().c_str() ; } element_not_found:: element_not_found(const string &_explanation) throw(): explanation(_explanation) {} const char* element_not_found::what() const throw() { string message = "Element not found in collection: " + explanation ; return message.c_str() ; } /** * @param _medium_name The medium that is unknown */ input_medium_type_unknown:: input_medium_type_unknown(const string &_medium_name) throw(): medium_name(_medium_name) {} const char* input_medium_type_unknown::what() const throw() { string message = "The specified input medium « "+ medium_name + " » is unknown!" ; return message.c_str() ; } const char* no_input_medium::what() const throw() { return "No input medium specified in configuration!" ; } const char* null_input_medium::what() const throw() { return "The input medium is not initialised!" ; } const char* no_input_csv_file::what() const throw() { return "No input CSV file specified in the configuration!" ; } const char* no_log_csv_file::what() const throw() { return "No log CSV file specified in the configuration!" ; } error_opening_input_file:: error_opening_input_file(const string &_file_name) throw(): file_name(_file_name) {} const char* error_opening_input_file::what() const throw() { string message = "Error opening input file « " + file_name + " »!" ; return message.c_str() ; }