* Log exceptions which make it up to the top of the http request frame, rather than having them disappear off into the ether

0.6.0-stable
Justin Clarke Casey 2008-03-31 17:34:32 +00:00
parent af3118eccd
commit 48fc4ee059
2 changed files with 89 additions and 87 deletions

View File

@ -78,13 +78,9 @@ namespace OpenSim.Framework.Communications
// See IInventoryServices
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
{
try
{
m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
InventoryFolderBase rootFolder = RequestRootFolder(userId);
// Agent is completely new and has no inventory structure yet.
@ -93,6 +89,7 @@ namespace OpenSim.Framework.Communications
return null;
}
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
userFolders.Add(rootFolder);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
@ -101,20 +98,13 @@ namespace OpenSim.Framework.Communications
userFolders.AddRange(folders);
}
// foreach (InventoryFolderBase folder in userFolders)
// {
// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
// }
// foreach (InventoryFolderBase folder in userFolders)
// {
// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
// }
return userFolders;
}
catch (Exception e)
{
m_log.ErrorFormat("GetInventorySkeleton() exception {0}", e);
}
return null;
}
// See IInventoryServices
public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder)

View File

@ -123,7 +123,14 @@ namespace OpenSim.Framework.Servers
return true;
}
/// <summary>
/// Handle an individual http request. This method is given to a worker in the thread pool.
/// </summary>
/// <param name="stateinfo"></param>
public virtual void HandleRequest(Object stateinfo)
{
// If we don't catch the exception here it will just disappear into the thread pool and we'll be none the wiser
try
{
HttpListenerContext context = (HttpListenerContext) stateinfo;
@ -170,7 +177,7 @@ namespace OpenSim.Framework.Servers
}
catch (HttpListenerException)
{
m_log.InfoFormat("[BASEHTTPSERVER] Http request abnormally terminated.");
m_log.InfoFormat("[BASE HTTP SERVER] Http request abnormally terminated.");
}
}
else
@ -192,6 +199,11 @@ namespace OpenSim.Framework.Servers
}
}
}
catch (Exception e)
{
m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
}
}
private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler)
{