[Positioning] Add class posexcept

posexcept derivates from std::exception.
Exception classes defined in posexcept.hh are now derivated from
posexcept instead of std::exception.
This commit is contained in:
Matteo Cypriani 2010-03-05 10:57:45 +01:00
parent 175719db6d
commit be8f0cf728
2 changed files with 23 additions and 11 deletions

View File

@ -6,6 +6,9 @@ using namespace std ;
/* *** Other exceptions *** */
bad_direction::bad_direction(const char _direction) throw() bad_direction::bad_direction(const char _direction) throw()
{ {
direction = _direction ; direction = _direction ;

View File

@ -6,7 +6,15 @@
class bad_direction: public std::exception /// Super-class of all exceptions defined in OWLPS-Positioning
class posexcept: public std::exception {} ;
/* *** Other exceptions *** */
class bad_direction: public posexcept
{ {
private: private:
char direction ; char direction ;
@ -17,7 +25,7 @@ public:
} ; } ;
class element_not_found: public std::exception class element_not_found: public posexcept
{ {
private: private:
std::string explanation ; std::string explanation ;
@ -33,7 +41,7 @@ public:
/* *** Input *** */ /* *** Input *** */
class input_medium_type_unknown: public std::exception class input_medium_type_unknown: public posexcept
{ {
private: private:
std::string medium_name ; std::string medium_name ;
@ -45,35 +53,35 @@ public:
} ; } ;
class no_input_medium: public std::exception class no_input_medium: public posexcept
{ {
public: public:
const char* what() const throw() ; const char* what() const throw() ;
} ; } ;
class null_input_medium: public std::exception class null_input_medium: public posexcept
{ {
public: public:
const char* what() const throw() ; const char* what() const throw() ;
} ; } ;
class no_input_csv_file: public std::exception class no_input_csv_file: public posexcept
{ {
public: public:
const char* what() const throw() ; const char* what() const throw() ;
} ; } ;
class no_log_csv_file: public std::exception class no_log_csv_file: public posexcept
{ {
public: public:
const char* what() const throw() ; const char* what() const throw() ;
} ; } ;
class error_opening_input_file: public std::exception class error_opening_input_file: public posexcept
{ {
private: private:
std::string file_name ; std::string file_name ;
@ -85,10 +93,11 @@ public:
} ; } ;
/* *** Output *** */ /* *** Output *** */
class output_medium_type_unknown: public std::exception class output_medium_type_unknown: public posexcept
{ {
private: private:
std::string medium_name ; std::string medium_name ;
@ -104,14 +113,14 @@ public:
/* *** Algorithms *** */ /* *** Algorithms *** */
class no_positioning_algorithm: public std::exception class no_positioning_algorithm: public posexcept
{ {
public: public:
const char* what() const throw() ; const char* what() const throw() ;
} ; } ;
class positioning_algorithm_unknown: public std::exception class positioning_algorithm_unknown: public posexcept
{ {
private: private:
std::string algo_name ; std::string algo_name ;