mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 11:09:43 +00:00
Made the "Unknown class key" exception slightly more helpful
This commit is contained in:
parent
a723ad8f29
commit
13be61812a
1 changed files with 4 additions and 1 deletions
|
@ -184,10 +184,13 @@ namespace MWWorld
|
|||
|
||||
const Class& Class::get (const std::string& key)
|
||||
{
|
||||
if (key.empty())
|
||||
throw std::logic_error ("Class::get(): attempting to get an empty key");
|
||||
|
||||
std::map<std::string, boost::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);
|
||||
|
||||
if (iter==sClasses.end())
|
||||
throw std::logic_error ("unknown class key: " + key);
|
||||
throw std::logic_error ("Class::get(): unknown class key: " + key);
|
||||
|
||||
return *iter->second;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue