Better error messages

This resolves http://opensimulator.org/mantis/view.php?id=6936
0.8.0.3
Oren Hurvitz 2013-10-30 15:10:29 +02:00
parent 773ffcafc3
commit 6734b94761
7 changed files with 28 additions and 29 deletions

View File

@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@ -158,7 +158,7 @@ namespace OpenSim.Groups
}
catch (Exception e)
{
m_log.DebugFormat("[Groups.RobustHGConnector]: Exception {0}", e.StackTrace);
m_log.Error(string.Format("[Groups.RobustHGConnector]: Exception {0} ", e.Message), e);
}
return FailureResult();

View File

@ -140,7 +140,7 @@ namespace OpenSim.Groups
}
catch (Exception e)
{
m_log.DebugFormat("[GROUPS HANDLER]: Exception {0}", e.StackTrace);
m_log.Error(string.Format("[GROUPS HANDLER]: Exception {0} ", e.Message), e);
}
return FailureResult();

View File

@ -109,7 +109,7 @@ namespace OpenSim.OfflineIM
}
catch (Exception e)
{
m_log.DebugFormat("[OFFLINE IM HANDLER]: Exception {0}", e.StackTrace);
m_log.Error(string.Format("[OFFLINE IM HANDLER]: Exception {0} ", e.Message), e);
}
return FailureResult();

View File

@ -897,15 +897,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
Part.Name, Part.UUID, false);
m_log.DebugFormat(
"[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}",
m_log.Debug(string.Format(
"[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4} ",
ScriptName,
PrimName,
Part.UUID,
Part.AbsolutePosition,
Part.ParentGroup.Scene.Name,
text.Replace("\n", "\\n"),
e.InnerException);
Part.ParentGroup.Scene.Name),
e);
}
catch (Exception)
{

View File

@ -280,11 +280,11 @@ namespace OpenSim.Server.Base
{
if (!(e is System.MissingMethodException))
{
m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}, {3}",
m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
interfaceName,
dllName,
e.InnerException == null ? e.Message : e.InnerException.Message,
e.StackTrace);
e.InnerException == null ? e.Message : e.InnerException.Message),
e);
}
m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length);
return null;

View File

@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset
}
catch (Exception e)
{
m_log.ErrorFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace);
m_log.Error(string.Format("[XINVENTORY HANDLER]: Exception {0} ", e.Message), e);
}
return FailureResult();

View File

@ -97,9 +97,9 @@ namespace OpenSim.Services.Connectors
}
catch (Exception e)
{
m_log.WarnFormat(
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3}{4}",
uri, thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
m_log.Warn(string.Format(
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3} ",
uri, thisRegion.RegionName, region.RegionName, e.Message), e);
return false;
}
@ -116,9 +116,9 @@ namespace OpenSim.Services.Connectors
}
catch (Exception e)
{
m_log.WarnFormat(
"[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2}{3}",
thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
m_log.Warn(string.Format(
"[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2} ",
thisRegion.RegionName, region.RegionName, e.Message), e);
return false;
}
@ -136,9 +136,9 @@ namespace OpenSim.Services.Connectors
}
catch (Exception e)
{
m_log.WarnFormat(
"[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2}{3}",
thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
m_log.Warn(string.Format(
"[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2} ",
thisRegion.RegionName, region.RegionName, e.Message), e);
return false;
}
@ -153,9 +153,9 @@ namespace OpenSim.Services.Connectors
}
catch (Exception e)
{
m_log.WarnFormat(
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}",
thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
m_log.Warn(string.Format(
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1} (uri {2}). Exception {3} ",
thisRegion.RegionName, region.RegionName, uri, e.Message), e);
return false;
}
@ -192,9 +192,9 @@ namespace OpenSim.Services.Connectors
}
catch (Exception e)
{
m_log.WarnFormat(
"[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2}{3}",
region.RegionName, thisRegion.RegionName, e.Message, e.StackTrace);
m_log.Warn(string.Format(
"[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2} ",
region.RegionName, thisRegion.RegionName, e.Message), e);
return false;
}