owlps/owlps-positioning/src/posexcept.cc

117 lines
2.8 KiB
C++

#include "posexcept.hh"
#include <sstream>
using namespace std ;
/* *** Other exceptions *** */
bad_direction::bad_direction(const char direction) throw()
{
ostringstream message ;
message << "`" << static_cast<int>(direction)
<< "` is not a valid direction value!" ;
explanation = message.str() ;
}
element_not_found::
element_not_found(const string &_explanation) throw():
posexcept("Element not found in collection:" + _explanation) {}
/* *** Data input *** */
topology_input_medium_type_unknown::
topology_input_medium_type_unknown(const string &medium_name) throw():
posexcept("The specified topology input medium « "+ medium_name +
" » is unknown!") {}
no_topology_input_csv_file::no_topology_input_csv_file() throw():
posexcept(
"No topologyinput CSV file specified in the configuration!") {}
malformed_topology::
malformed_topology(const string &_explanation) throw():
posexcept("Error reading the topology:" + _explanation) {}
/* *** Input *** */
/**
* @param medium_name The medium that is unknown
*/
input_medium_type_unknown::
input_medium_type_unknown(const string &medium_name) throw():
posexcept("The specified input medium « "+ medium_name +
" » is unknown!") {}
no_input_medium::no_input_medium() throw():
posexcept("No input medium specified in configuration!") {}
null_input_medium::null_input_medium() throw():
posexcept("The input medium is not initialised!") {}
no_input_csv_file::no_input_csv_file() throw():
posexcept("No input CSV file specified in the configuration!") {}
no_log_csv_file::no_log_csv_file() throw():
posexcept("No log CSV file specified in the configuration!") {}
error_opening_input_file::
error_opening_input_file(const string &file_name) throw():
posexcept("Error opening input file « " + file_name + " »!") {}
/* *** Output *** */
/**
* @param medium_name The medium that is unknown
*/
output_medium_type_unknown::
output_medium_type_unknown(const string &medium_name) throw():
posexcept("The specified output medium « "+ medium_name +
" » is unknown!") {}
no_output_csv_file::no_output_csv_file() throw():
posexcept("No output CSV file specified in the configuration!") {}
error_opening_output_file::
error_opening_output_file(const string &file_name) throw():
posexcept("Error opening output file « " + file_name + " »!") {}
/* *** Algorithms *** */
no_positioning_algorithm::no_positioning_algorithm() throw():
posexcept("No positioning algorithm specified in configuration!") {}
/**
* @param algo_name The algo that is unknown
*/
positioning_algorithm_unknown::
positioning_algorithm_unknown(const string &algo_name) throw():
posexcept("The specified positioning_algorithm « "+ algo_name +
" » is unknown!") {}