switch debug console functions to luasetup error handling
This commit is contained in:
@@ -851,13 +851,13 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugConsole.ThrowError($"No hook method found in _hookMethods[{methodPath}]");
|
luaSetup.PrintError($"No hook method found in _hookMethods[{methodPath}]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
DebugConsole.ThrowError(nameof(_hookLuaPatch), ex);
|
luaSetup.HandleLuaException(ex, nameof(_hookLuaPatch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -941,10 +941,10 @@ namespace Barotrauma
|
|||||||
if (hookMethod != null)
|
if (hookMethod != null)
|
||||||
{
|
{
|
||||||
if (!_hookMethods.TryAdd(methodPath, hookMethod))
|
if (!_hookMethods.TryAdd(methodPath, hookMethod))
|
||||||
DebugConsole.ThrowError($"Failed to add key-value in {nameof(_hookMethods)}\n[{methodPath}, {hookMethod.ToString()}]");
|
env.PrintError($"Failed to add key-value in {nameof(_hookMethods)}\n[{methodPath}, {hookMethod.ToString()}]");
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
else
|
else
|
||||||
DebugConsole.NewMessage($"Sucessfully added key-value in {nameof(_hookMethods)}\n[{methodPath}, {hookMethod.ToString()}]", Color.LightSkyBlue);
|
env.PrintMessage($"Sucessfully added key-value in {nameof(_hookMethods)}\n[{methodPath}, {hookMethod.ToString()}]");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user