mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-27 14:37:04 +00:00
Catch unhandled exceptions
This commit is contained in:
parent
da06cd005e
commit
deba5b4d47
@ -5,6 +5,7 @@
|
||||
#include <extern/oics/ICSChannelListener.h>
|
||||
#include <extern/oics/ICSInputControlSystem.h>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/files/conversion.hpp>
|
||||
#include <components/sdlutil/sdlmappings.hpp>
|
||||
|
||||
@ -193,7 +194,14 @@ namespace MWInput
|
||||
|
||||
BindingsManager::~BindingsManager()
|
||||
{
|
||||
mInputBinder->save(Files::pathToUnicodeString(mUserFile));
|
||||
try
|
||||
{
|
||||
mInputBinder->save(Files::pathToUnicodeString(mUserFile));
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
Log(Debug::Error) << "Failed to save input bindings: " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
void BindingsManager::update(float dt)
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include <apps/openmw/profile.hpp>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/settings/values.hpp>
|
||||
|
||||
#include <osgViewer/Viewer>
|
||||
@ -82,7 +83,14 @@ namespace MWLua
|
||||
if (mJoinRequest)
|
||||
break;
|
||||
|
||||
update();
|
||||
try
|
||||
{
|
||||
update();
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
Log(Debug::Error) << "Failed to update LuaManager: " << e.what();
|
||||
}
|
||||
|
||||
mUpdateRequest = false;
|
||||
lk.unlock();
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <osg/Group>
|
||||
#include <osg/PositionAttitudeTransform>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/esm3/loadpgrd.hpp>
|
||||
#include <components/misc/coordinateconverter.hpp>
|
||||
#include <components/resource/resourcesystem.hpp>
|
||||
@ -36,7 +37,14 @@ namespace MWRender
|
||||
{
|
||||
if (mPathgridEnabled)
|
||||
{
|
||||
togglePathgrid();
|
||||
try
|
||||
{
|
||||
togglePathgrid();
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
Log(Debug::Error) << "Failed to destroy pathgrid: " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user