diff --git a/libwccl/lexicon/lexicon.cpp b/libwccl/lexicon/lexicon.cpp index 3dd0f38513c840c7e6a454f06d899c963c3c1992..74d13417258765e581a9166dae0a63122ec44952 100644 --- a/libwccl/lexicon/lexicon.cpp +++ b/libwccl/lexicon/lexicon.cpp @@ -33,13 +33,13 @@ boost::shared_ptr<StrSet> Lexicon::translate(const StrSet& set) const void Lexicon::insert(const UnicodeString& key, const UnicodeString& value) { if (has_key(key)) { - throw InvalidArgument("key", PwrNlp::to_utf8(key) + " - entry already added."); + throw InvalidArgument("key", "Duplicated key in lexicon: " + PwrNlp::to_utf8(key)); } if (key.isEmpty()) { - throw InvalidArgument("key", "Cannot add an empty string."); + throw InvalidArgument("key", "Empty key string in lexicon."); } if (value.isEmpty()) { - throw InvalidArgument("value", "Cannot add an empty string."); + throw InvalidArgument("value", "Empty value string in lexicon."); } map_[key] = value; }