2010-02-11 17:24:21 +01:00
|
|
|
#include "posexcept.hh"
|
|
|
|
|
2010-02-18 12:23:05 +01:00
|
|
|
#include <sstream>
|
|
|
|
|
2010-02-11 17:24:21 +01:00
|
|
|
using namespace std ;
|
|
|
|
|
|
|
|
|
2010-03-04 11:59:17 +01:00
|
|
|
|
2010-03-05 10:57:45 +01:00
|
|
|
/* *** Other exceptions *** */
|
|
|
|
|
|
|
|
|
2010-02-26 13:09:45 +01:00
|
|
|
bad_direction::bad_direction(const char _direction) throw()
|
|
|
|
{
|
|
|
|
direction = _direction ;
|
|
|
|
}
|
2010-02-18 12:23:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
const char* bad_direction::what() const throw()
|
|
|
|
{
|
|
|
|
ostringstream message ;
|
|
|
|
message << "`" << static_cast<int>(direction)
|
|
|
|
<< "` is not a valid direction value!" ;
|
|
|
|
return message.str().c_str() ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-11 18:33:45 +01:00
|
|
|
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() ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-04 11:59:17 +01:00
|
|
|
|
|
|
|
/* *** Input *** */
|
|
|
|
|
|
|
|
|
2010-02-11 17:24:21 +01:00
|
|
|
/**
|
|
|
|
* @param _medium_name The medium that is unknown
|
|
|
|
*/
|
|
|
|
input_medium_type_unknown::
|
2010-02-11 18:33:45 +01:00
|
|
|
input_medium_type_unknown(const string &_medium_name) throw():
|
|
|
|
medium_name(_medium_name) {}
|
2010-02-11 17:24:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
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!" ;
|
|
|
|
}
|
2010-02-11 18:33:45 +01:00
|
|
|
|
|
|
|
|
2010-02-16 16:19:39 +01:00
|
|
|
const char* no_log_csv_file::what() const throw()
|
|
|
|
{
|
|
|
|
return "No log CSV file specified in the configuration!" ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-11 18:33:45 +01:00
|
|
|
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() ;
|
|
|
|
}
|
2010-03-04 11:59:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* *** Output *** */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param _medium_name The medium that is unknown
|
|
|
|
*/
|
|
|
|
output_medium_type_unknown::
|
|
|
|
output_medium_type_unknown(const string &_medium_name) throw():
|
|
|
|
medium_name(_medium_name) {}
|
|
|
|
|
|
|
|
|
|
|
|
const char* output_medium_type_unknown::what() const throw()
|
|
|
|
{
|
|
|
|
string message = "The specified output medium « "+ medium_name +
|
|
|
|
" » is unknown!" ;
|
|
|
|
return message.c_str() ;
|
|
|
|
}
|
2010-03-04 17:51:44 +01:00
|
|
|
|
|
|
|
|
2010-03-08 17:36:16 +01:00
|
|
|
const char* no_output_csv_file::what() const throw()
|
|
|
|
{
|
|
|
|
return "No input CSV file specified in the configuration!" ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-22 14:14:44 +01:00
|
|
|
error_opening_output_file::
|
|
|
|
error_opening_output_file(const string &_file_name) throw():
|
|
|
|
file_name(_file_name) {}
|
|
|
|
|
|
|
|
|
|
|
|
const char* error_opening_output_file::what() const throw()
|
|
|
|
{
|
|
|
|
string message = "Error opening output file « " +
|
|
|
|
file_name + " »!" ;
|
|
|
|
return message.c_str() ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-04 17:51:44 +01:00
|
|
|
|
|
|
|
/* *** Algorithms *** */
|
|
|
|
|
|
|
|
|
|
|
|
const char* no_positioning_algorithm::what() const throw()
|
|
|
|
{
|
|
|
|
return "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():
|
|
|
|
algo_name(_algo_name) {}
|
|
|
|
|
|
|
|
|
|
|
|
const char* positioning_algorithm_unknown::what() const throw()
|
|
|
|
{
|
|
|
|
string message = "The specified positioning_algorithm « "+ algo_name +
|
|
|
|
" » is unknown!" ;
|
|
|
|
return message.c_str() ;
|
|
|
|
}
|