Handling and logging exceptions thrown by ItemComponent constructors, added stack traces to a couple of error messages

This commit is contained in:
Joonas Rikkonen
2018-08-06 14:53:07 +03:00
parent 7c93730fc3
commit e60ebc1930
3 changed files with 17 additions and 6 deletions

View File

@@ -200,7 +200,7 @@ namespace Barotrauma.Networking
catch (Exception e)
{
string errorMsg = "Failed to read event for entity \"" + entity.ToString() + "\"! (MidRoundSyncing: " + thisClient.MidRoundSyncing + ")\n" + e.StackTrace;
string errorMsg = "Failed to read event for entity \"" + entity.ToString() + "\" (" + e.Message + ")! (MidRoundSyncing: " + thisClient.MidRoundSyncing + ")\n" + e.StackTrace;
errorMsg += "\nPrevious entities:";
for (int j = entities.Count - 2; j >= 0; j--)
{