owlps/owlps-positioning/src/posexcept.hh

144 lines
2.4 KiB
C++
Raw Normal View History

#ifndef _OWLPS_POSITIONING_POSEXCEPT_HH_
#define _OWLPS_POSITIONING_POSEXCEPT_HH_
#include <exception>
#include <string>
/// Super-class of all exceptions defined in OWLPS-Positioning
class posexcept: public std::exception {} ;
/* *** Other exceptions *** */
class bad_direction: public posexcept
{
private:
char direction ;
public:
bad_direction(const char _direction) throw() ;
const char* what() const throw() ;
} ;
class element_not_found: public posexcept
{
private:
std::string explanation ;
public:
element_not_found(const std::string &_explanation) throw() ;
~element_not_found(void) throw() {}
const char* what(void) const throw() ;
} ;
/* *** Input *** */
class input_medium_type_unknown: public posexcept
{
private:
std::string medium_name ;
public:
input_medium_type_unknown(const std::string &_medium_name) throw() ;
~input_medium_type_unknown(void) throw() {}
const char* what(void) const throw() ;
} ;
class no_input_medium: public posexcept
{
public:
const char* what() const throw() ;
} ;
class null_input_medium: public posexcept
{
public:
const char* what() const throw() ;
} ;
class no_input_csv_file: public posexcept
{
public:
const char* what() const throw() ;
} ;
class no_log_csv_file: public posexcept
{
public:
const char* what() const throw() ;
} ;
class error_opening_input_file: public posexcept
{
private:
std::string file_name ;
public:
error_opening_input_file(const std::string &_file_name) throw() ;
~error_opening_input_file(void) throw() {}
const char* what(void) const throw() ;
} ;
/* *** Output *** */
class output_medium_type_unknown: public posexcept
{
private:
std::string medium_name ;
public:
output_medium_type_unknown(const std::string &_medium_name) throw() ;
~output_medium_type_unknown(void) throw() {}
const char* what(void) const throw() ;
} ;
class no_output_csv_file: public posexcept
{
public:
const char* what() const throw() ;
} ;
/* *** Algorithms *** */
class no_positioning_algorithm: public posexcept
{
public:
const char* what() const throw() ;
} ;
class positioning_algorithm_unknown: public posexcept
{
private:
std::string algo_name ;
public:
positioning_algorithm_unknown(const std::string &_algo_name) throw() ;
~positioning_algorithm_unknown(void) throw() {}
const char* what(void) const throw() ;
} ;
#endif // _OWLPS_POSITIONING_POSEXCEPT_HH_