Skip to content

Commit

Permalink
Revert "Log the full exception when errors occur in BaseHttpServer"
Browse files Browse the repository at this point in the history
This reverts commit e31e7c6.

Applied for patch assessment and accidentally committed too early.
  • Loading branch information
Justin Clark-Casey (justincc) committed Apr 27, 2012
1 parent a90b0e3 commit 737e177
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
Expand Up @@ -356,7 +356,7 @@ private void OnRequest(object source, RequestEventArgs args)
}
catch (Exception e)
{
m_log.Error(String.Format("[BASE HTTP SERVER]: OnRequest() failed: {0}", e.Message), e);
m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0}{1}", e.Message, e.StackTrace);
}
}

Expand Down Expand Up @@ -551,11 +551,11 @@ public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
catch (IOException e)
{
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.", e.Message), e);
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
}

return;
Expand Down Expand Up @@ -658,15 +658,15 @@ public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response
//
// An alternative may be to turn off all response write exceptions on the HttpListener, but let's go
// with the minimum first
m_log.Warn(String.Format("[BASE HTTP SERVER]: HandleRequest threw {0}.\nNOTE: this may be spurious on Linux", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: HandleRequest threw {0}.\nNOTE: this may be spurious on Linux", e);
}
catch (IOException e)
{
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0}", e.Message), e);
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}{1}", e.Message, e.StackTrace);
}
catch (Exception e)
{
m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0}", e.Message), e);
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}{1}", e.Message, e.StackTrace);
SendHTML500(response);
}
finally
Expand Down Expand Up @@ -925,11 +925,11 @@ string errorMessage
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
catch (IOException e)
{
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}", e.Message), e);
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
}
}
return;
Expand Down Expand Up @@ -962,11 +962,11 @@ string errorMessage
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
catch (IOException e)
{
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}", e.Message), e);
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
}
}
}
Expand Down Expand Up @@ -1077,12 +1077,12 @@ private void HandleLLSDRequests(OSHttpRequest request, OSHttpResponse response)
}
catch (IOException e)
{
m_log.Warn(String.Format("[BASE HTTP SERVER]: LLSD IOException {0}", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: LLSD IOException {0}.", e);
}
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
}
}
Expand Down Expand Up @@ -1334,8 +1334,8 @@ private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request
catch (SocketException f)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(
String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", f.Message), f);
m_log.WarnFormat(
"[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", f);
}
}
catch(Exception)
Expand Down Expand Up @@ -1630,11 +1630,11 @@ internal void DoHTTPGruntWork(Hashtable responsedata, OSHttpResponse response)
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
catch (IOException e)
{
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}", e.Message), e);
m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message);
}
}
}
Expand Down Expand Up @@ -1671,7 +1671,7 @@ public void SendHTML404(OSHttpResponse response, string host)
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
}
}
Expand Down Expand Up @@ -1707,7 +1707,7 @@ public void SendHTML500(OSHttpResponse response)
catch (SocketException e)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(String.Format("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e.Message), e);
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
}
}
}
Expand Down Expand Up @@ -1786,7 +1786,7 @@ public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError e

public void httpServerException(object source, Exception exception)
{
m_log.Error(String.Format("[BASE HTTP SERVER]: {0} had an exception: {1}", source.ToString(), exception.Message), exception);
m_log.ErrorFormat("[BASE HTTP SERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
/*
if (HTTPDRunning)// && NotSocketErrors > 5)
{
Expand Down

0 comments on commit 737e177

Please sign in to comment.