Replace Base::Exception with appropriate subclass

This commit is contained in:
wmayer
2018-11-14 18:02:49 +01:00
parent f9e487e4b2
commit fc16bcbfca
4 changed files with 9 additions and 9 deletions

View File

@@ -456,13 +456,13 @@ void PropertySheet::setDisplayUnit(CellAddress address, const std::string &unit)
void PropertySheet::setAlias(CellAddress address, const std::string &alias)
{
if (alias.size() > 0 && !isValidAlias(alias))
throw Base::Exception("Invalid alias");
throw Base::ValueError("Invalid alias");
const Cell * aliasedCell = getValueFromAlias(alias);
Cell * cell = nonNullCellAt(address);
if (aliasedCell != 0 && cell != aliasedCell)
throw Base::Exception("Alias already defined.");
throw Base::ValueError("Alias already defined.");
assert(cell != 0);