Added exception handling.

zircon^2
andy 2007-05-14 01:00:52 +00:00
parent ca595e2779
commit 6361bb7664
1 changed files with 133 additions and 111 deletions

View File

@ -142,6 +142,8 @@ namespace OpenSim.UserServer
} // LoginServer } // LoginServer
public void SetDefaultValues() public void SetDefaultValues()
{
try
{ {
this.DST = "N"; this.DST = "N";
this.StipendSinceLogin = "N"; this.StipendSinceLogin = "N";
@ -201,11 +203,18 @@ namespace OpenSim.UserServer
this.agentInventory.Add(TempHash); this.agentInventory.Add(TempHash);
} }
Hashtable InitialOutfitHash = new Hashtable(); Hashtable InitialOutfitHash = new Hashtable();
InitialOutfitHash["folder_name"] = "Nightclub Female"; InitialOutfitHash["folder_name"] = "Nightclub Female";
InitialOutfitHash["gender"] = "female"; InitialOutfitHash["gender"] = "female";
this.initialOutfit.Add(InitialOutfitHash); this.initialOutfit.Add(InitialOutfitHash);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(
OpenSim.Framework.Console.LogPriority.LOW,
"LoginResponse: Unable to set default values: " + e.Message
);
}
} // SetDefaultValues } // SetDefaultValues
@ -251,6 +260,9 @@ namespace OpenSim.UserServer
public XmlRpcResponse ToXmlRpcResponse() public XmlRpcResponse ToXmlRpcResponse()
{ {
try
{
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
this.loginFlagsHash = new Hashtable(); this.loginFlagsHash = new Hashtable();
@ -311,6 +323,16 @@ namespace OpenSim.UserServer
this.xmlRpcResponse.Value = responseData; this.xmlRpcResponse.Value = responseData;
return (this.xmlRpcResponse); return (this.xmlRpcResponse);
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(
OpenSim.Framework.Console.LogPriority.LOW,
"LoginResponse: Error creating XML-RPC Response: " + e.Message
);
return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false"));
}
} // ToXmlRpcResponse } // ToXmlRpcResponse