aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-13 18:04:01 +0000
committerJustin Clarke Casey2008-06-13 18:04:01 +0000
commitd6519924ba096c569294aa6653e6720629002f8e (patch)
tree1ff575b5ff68e7d418b9e1f73e272804d1cc4410 /OpenSim/Framework/Communications/Cache/AssetServerBase.cs
parent* minor: Remove LINK_SET debug Console Writeline (diff)
downloadopensim-SC_OLD-d6519924ba096c569294aa6653e6720629002f8e.zip
opensim-SC_OLD-d6519924ba096c569294aa6653e6720629002f8e.tar.gz
opensim-SC_OLD-d6519924ba096c569294aa6653e6720629002f8e.tar.bz2
opensim-SC_OLD-d6519924ba096c569294aa6653e6720629002f8e.tar.xz
* refactor: catch asset service request exceptions at the AssetServerBase level rather than in the GridAssetClient
* this is to enable logging of asset request exceptions soon
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetServerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs23
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index db71079..053cb0f 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -57,6 +57,10 @@ namespace OpenSim.Framework.Communications.Cache
57 /// </summary> 57 /// </summary>
58 /// <param name="req"></param> 58 /// <param name="req"></param>
59 /// <returns></returns> 59 /// <returns></returns>
60 /// <exception cref="System.Exception">
61 /// Thrown if the request failed for some other reason than that the
62 /// asset cannot be found.
63 /// </exception>
60 protected abstract AssetBase GetAsset(AssetRequest req); 64 protected abstract AssetBase GetAsset(AssetRequest req);
61 65
62 /// <summary> 66 /// <summary>
@@ -66,17 +70,30 @@ namespace OpenSim.Framework.Communications.Cache
66 /// <param name="req"></param> 70 /// <param name="req"></param>
67 protected virtual void ProcessRequest(AssetRequest req) 71 protected virtual void ProcessRequest(AssetRequest req)
68 { 72 {
69 AssetBase asset = GetAsset(req); 73 AssetBase asset;
74
75 try
76 {
77 asset = GetAsset(req);
78 }
79 catch (Exception e)
80 {
81 m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e);
82
83 m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
84
85 return;
86 }
70 87
71 if (asset != null) 88 if (asset != null)
72 { 89 {
73 //m_log.InfoFormat("[ASSETSERVER]: Asset {0} received from asset server", req.AssetID); 90 m_log.DebugFormat("[ASSET]: Asset {0} received from asset server", req.AssetID);
74 91
75 m_receiver.AssetReceived(asset, req.IsTexture); 92 m_receiver.AssetReceived(asset, req.IsTexture);
76 } 93 }
77 else 94 else
78 { 95 {
79 //m_log.ErrorFormat("[ASSET SERVER]: Asset {0} not found by asset server", req.AssetID); 96 m_log.WarnFormat("[ASSET]: Asset {0} not found by asset server", req.AssetID);
80 97
81 m_receiver.AssetNotFound(req.AssetID, req.IsTexture); 98 m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
82 } 99 }