Better error handling in AssetServerPostHandler. Invalid XML causes an InvalidOperationException, not an XmlException

This commit is contained in:
Oren Hurvitz
2014-05-06 09:43:07 +03:00
parent 614b9e14c4
commit ef262799ca

View File

@@ -64,7 +64,7 @@ namespace OpenSim.Server.Handlers.Asset
{
asset = (AssetBase)xs.Deserialize(request);
}
catch (XmlException)
catch (Exception)
{
httpResponse.StatusCode = (int)HttpStatusCode.BadRequest;
return null;