use specialized exception classes

This commit is contained in:
wmayer
2017-04-28 18:49:11 +02:00
parent 998c000516
commit fb7094bf31
60 changed files with 675 additions and 349 deletions

View File

@@ -75,13 +75,13 @@ void Extension::initExtensionType(Base::Type type) {
m_extensionType = type;
if(m_extensionType.isBad())
throw Base::Exception("Extension: Extension type not set");
throw Base::RuntimeError("Extension: Extension type not set");
}
void Extension::initExtension(ExtensionContainer* obj) {
if(m_extensionType.isBad())
throw Base::Exception("Extension: Extension type not set");
throw Base::RuntimeError("Extension: Extension type not set");
//all properties are initialised without PropertyContainer father. Now that we know it we can
//finally finish the property initialisation
@@ -108,7 +108,7 @@ PyObject* Extension::getExtensionPyObject(void) {
std::string Extension::name() const {
if(m_extensionType.isBad())
throw Base::Exception("Extension::name: Extension type not set");
throw Base::RuntimeError("Extension::name: Extension type not set");
std::string temp(m_extensionType.getName());
std::string::size_type pos = temp.find_last_of(":");