Replace Base::Exception with appropriate subclass

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

View File

@@ -427,7 +427,7 @@ void Sheet::getCellAddress(const Property *prop, CellAddress & address)
if (i != propAddress.end())
address = i->second;
else
throw Base::Exception("Property is not a cell");
throw Base::TypeError("Property is not a cell");
}
/**
@@ -1137,14 +1137,14 @@ void Sheet::setAlias(CellAddress address, const std::string &alias)
if (existingAlias == address.toString()) // Same as old?
return;
else
throw Base::Exception("Alias already defined");
throw Base::ValueError("Alias already defined");
}
else if (alias.size() == 0) // Empty?
cells.setAlias(address, "");
else if (isValidAlias(alias)) // Valid?
cells.setAlias(address, alias);
else
throw Base::Exception("Invalid alias");
throw Base::ValueError("Invalid alias");
}
/**