1 #ifndef FAIF_EXCEPTIONS_H_ 2 #define FAIF_EXCEPTIONS_H_ 8 #pragma warning(disable:4996) 22 virtual const char *what()
const throw() {
return "FaifException"; }
25 virtual std::ostream&
print(std::ostream& os)
const throw() {
26 os << what() << std::endl;
33 static const int SIZE = 30;
36 strncpy(domainID_,domain_id,SIZE);
37 domainID_[SIZE-1]=
'\0';
40 virtual const char *what()
const throw(){
return "NotFoundException"; }
41 virtual std::ostream&
print(std::ostream& os)
const throw() {
42 os <<
"Value in domain " << domainID_ <<
" not found";
51 inline std::ostream& operator<<(std::ostream& os,
const FaifException& ex) {
59 #endif //FAIF_EXCEPTIONS_H_
the base exception class for faif library
Definition: ExceptionsFaif.hpp:18
virtual std::ostream & print(std::ostream &os) const
the exception info written to ostream
Definition: ExceptionsFaif.hpp:41
virtual std::ostream & print(std::ostream &os) const
the exception info written to ostream
Definition: ExceptionsFaif.hpp:25
the exception thrown when the value for given attribute is not found
Definition: ExceptionsFaif.hpp:32