Replace Base::Exception with appropriate subclass

This commit is contained in:
wmayer
2018-11-14 17:47:43 +01:00
parent d11bfed7c6
commit cda4c96fa8
7 changed files with 12 additions and 12 deletions

View File

@@ -99,7 +99,7 @@ void Toolpath::insertCommand(const Command &Cmd, int pos)
Command *tmp = new Command(Cmd);
vpcCommands.insert(vpcCommands.begin()+pos,tmp);
} else {
throw Base::Exception("Index not in range");
throw Base::IndexError("Index not in range");
}
recalculate();
}
@@ -112,7 +112,7 @@ void Toolpath::deleteCommand(int pos)
} else if (pos <= static_cast<int>(vpcCommands.size())) {
vpcCommands.erase (vpcCommands.begin()+pos);
} else {
throw Base::Exception("Index not in range");
throw Base::IndexError("Index not in range");
}
recalculate();
}
@@ -282,7 +282,7 @@ void Toolpath::recalculate(void) // recalculates the path cache
}
}
} catch (KDL::Error &e) {
throw Base::Exception(e.Description());
throw Base::RuntimeError(e.Description());
}
#endif
}