Introduce specific exception for out of range attribute indexing

This commit is contained in:
Thomas Krijnen
2015-06-17 11:04:28 +00:00
parent 381f711103
commit 1ec14118fe
10 changed files with 748 additions and 742 deletions
+14 -4
View File
@@ -26,11 +26,21 @@
namespace IfcParse {
class IfcException : public std::exception {
private:
std::string error;
std::string message;
public:
IfcException(std::string e);
~IfcException () throw ();
const char* what() const throw();
IfcException(const std::string& m)
: message(m) {}
~IfcException () throw () {}
const char* what() const throw() {
return message.c_str();
}
};
class IfcAttributeOutOfRangeException : public IfcException {
public:
IfcAttributeOutOfRangeException(const std::string& e)
: IfcException(e) {}
~IfcAttributeOutOfRangeException () throw () {}
};
}