Skip to content

Commit

Permalink
Algorithm functions should throw exceptions instead of displaying Mes…
Browse files Browse the repository at this point in the history
…sageboxes, adjust changeEntityClassname() function accordingly.
  • Loading branch information
codereader committed Dec 28, 2017
1 parent 0a7e73a commit 39d50c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions radiant/selection/algorithm/Entity.cpp
Expand Up @@ -103,8 +103,7 @@ void setEntityClassname(const std::string& classname)
{
if (classname.empty())
{
wxutil::Messagebox::ShowError(_("Cannot set classname to an empty string."));
return;
throw std::runtime_error(_("Cannot set classname to an empty string."));
}

if (classname == "worldspawn")
Expand Down

0 comments on commit 39d50c0

Please sign in to comment.