diff options
author | Justin Clark-Casey (justincc) | 2011-07-13 01:19:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-13 01:19:12 +0100 |
commit | 938b4f8bf84cac689538817263bfb3d79755c903 (patch) | |
tree | cff3eacf80af03e7e7c4b5a81e00145c1565786f | |
parent | Remove the obsoleted SynchronousRestObjectPoster (diff) | |
download | opensim-SC_OLD-938b4f8bf84cac689538817263bfb3d79755c903.zip opensim-SC_OLD-938b4f8bf84cac689538817263bfb3d79755c903.tar.gz opensim-SC_OLD-938b4f8bf84cac689538817263bfb3d79755c903.tar.bz2 opensim-SC_OLD-938b4f8bf84cac689538817263bfb3d79755c903.tar.xz |
if a SynchronousRestObjectRequester request fails, then unless it's due to a 404, log the exception for diagnostic purposes
This is instead of logging "Invalid XML" for all failures, even if they weren't a result of invalid xml.
A default TReponse is returned in the event of a 404, which is the same behaviour as previously.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index f33b7a2..87eeeb6 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -987,6 +987,17 @@ namespace OpenSim.Framework | |||
987 | 987 | ||
988 | } | 988 | } |
989 | } | 989 | } |
990 | catch (WebException e) | ||
991 | { | ||
992 | HttpWebResponse hwr = (HttpWebResponse)e.Response; | ||
993 | |||
994 | if (hwr != null && hwr.StatusCode == HttpStatusCode.NotFound) | ||
995 | return deserial; | ||
996 | else | ||
997 | m_log.ErrorFormat( | ||
998 | "[SynchronousRestObjectRequester]: WebException {0} {1} {2} {3}", | ||
999 | requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace); | ||
1000 | } | ||
990 | catch (System.InvalidOperationException) | 1001 | catch (System.InvalidOperationException) |
991 | { | 1002 | { |
992 | // This is what happens when there is invalid XML | 1003 | // This is what happens when there is invalid XML |