From 9e310a0c0f9cbe06663fcd28fbd0ade3cb119d3d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 12 May 2011 18:53:22 -0700 Subject: Sequencing the using and try clauses as they were before, but this shows that that obsolete function is not catching 404's as it should... --- OpenSim/Framework/WebUtil.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 0b99e82..e9a1e03 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -976,9 +976,9 @@ namespace OpenSim.Framework } } - using (WebResponse resp = request.GetResponse()) + try { - try + using (WebResponse resp = request.GetResponse()) { if (resp.ContentLength > 0) { @@ -988,11 +988,11 @@ namespace OpenSim.Framework respStream.Close(); } } - catch (System.InvalidOperationException) - { - // This is what happens when there is invalid XML - m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString()); - } + } + catch (System.InvalidOperationException) + { + // This is what happens when there is invalid XML + m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString()); } return deserial; } -- cgit v1.1