print error before throwing tf

This commit is contained in:
LightCat 2019-03-10 12:16:57 +01:00
parent c7ab36baa4
commit 47bd66b079
2 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,10 @@ public:
{
addr = (void *) SigScanFunc(pattern);
if (!addr)
{
logging::Info("Signature not found");
throw std::runtime_error("Signature not found");
}
addr = static_cast<void *>(static_cast<char *>(addr) + offset);
size = patch.size();
original.resize(size);

View File

@ -2,6 +2,7 @@
Created on 02.07.18.
*/
#include "logging.hpp"
#include <settings/Manager.hpp>
namespace settings
@ -17,6 +18,7 @@ void Manager::add(IVariable &me, std::string name)
{
if (registered.find(name) != registered.end())
{
logging::Info(("Double registering variable: " + name).c_str());
throw std::runtime_error("Double registering variable: " + name);
}
registered.emplace(name, me);
@ -40,4 +42,4 @@ bool Manager::VariableDescriptor::isChanged()
{
return variable.toString() != defaults;
}
} // namespace settings
} // namespace settings