Skip to content

Commit

Permalink
remove new from 'throw std::exception();'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Jul 7, 2022
1 parent 9450ce7 commit c7fc11c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions SporeModLoader/SporeModLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,20 @@ bool SporeModLoader::Initialize()
errorMessage = path;
errorMessage += L" doesn't exist!";
ShowErrorMessage(errorMessage);
throw new std::exception();
throw std::exception();
}
}

switch (GetCurrentGameVersion())
{
case SporeExecutableType::Unknown:
ShowErrorMessage(L"Unknown Spore version!");
throw new std::exception();
break;
throw std::exception();

case SporeExecutableType::Origin_1_5_1:
case SporeExecutableType::GogOrSteam_1_5_1:
ShowErrorMessage(L"Update Spore to the latest version!");
throw new std::exception();
break;
throw std::exception();

case SporeExecutableType::Origin_March2017:
case SporeExecutableType::GogOrSteam_March2017:
Expand Down Expand Up @@ -197,7 +195,7 @@ bool SporeModLoader::LoadCoreLibs()
AddLogMessage("SporeModLoader::LoadCoreLibs()");
if (!LoadLibrariesInPath(l_ModLoaderCoreLibsPath))
{
throw new std::exception();
throw std::exception();
}
AddLogMessage("SporeModLoader::LoadCoreLibs() == TRUE");
return true;
Expand All @@ -217,7 +215,7 @@ bool SporeModLoader::LoadModLibs()
AddLogMessage("SporeModLoader::LoadModLibs()");
if (!LoadLibrariesInPath(l_ModLoaderModLibsPath))
{
throw new std::exception();
throw std::exception();
}
AddLogMessage("SporeModLoader::LoadModLibs() == TRUE");
return true;
Expand Down

0 comments on commit c7fc11c

Please sign in to comment.