More informative exception messages in LieValues

release/4.3a0
Alex Cunningham 2011-09-22 17:23:50 +00:00
parent 054a534f1c
commit 3e7c48269d
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ namespace gtsam {
template<class J>
const typename J::Value& LieValues<J>::at(const J& j) const {
const_iterator it = values_.find(j);
if (it == values_.end()) throw std::invalid_argument("invalid j: " + (string)j);
if (it == values_.end()) throw std::invalid_argument("LieValues::at() invalid j: " + (string)j);
else return it->second;
}
@ -130,7 +130,7 @@ namespace gtsam {
template<class J>
void LieValues<J>::erase(const J& j, size_t& dim) {
iterator it = values_.find(j);
if (it == values_.end()) throw std::invalid_argument("invalid j: " + (string)j);
if (it == values_.end()) throw std::invalid_argument("LieValues::erase() invalid j: " + (string)j);
dim = it->second.dim();
values_.erase(it);
}