mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
More elaborate error reporting
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
|
||||
#include "IfcParse_Export.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
@@ -51,6 +53,22 @@ namespace IfcParse {
|
||||
: IfcException(e) {}
|
||||
~IfcAttributeOutOfRangeException () throw () {}
|
||||
};
|
||||
|
||||
class IfcInvalidTokenException : public IfcException {
|
||||
public:
|
||||
IfcInvalidTokenException(
|
||||
int token_start,
|
||||
const std::string& token_string,
|
||||
const std::string& expected_type
|
||||
)
|
||||
: IfcException(
|
||||
std::string("Token ") + token_string + " at " +
|
||||
boost::lexical_cast<std::string>(token_start) +
|
||||
" invalid " + expected_type
|
||||
)
|
||||
{}
|
||||
~IfcInvalidTokenException() throw () {}
|
||||
};
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
Reference in New Issue
Block a user