From 72923134e9ab9ab946253c883d40536af389ab18 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Nov 2011 18:40:49 +0000 Subject: Get some hopefully more useful exception information when OpenJPEG.EncodeFromImage() fails in VectorRender and DynamicTexture modules --- .../CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 6 ++++-- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 6075e19..f2c8b3d 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -395,9 +395,11 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture { result = OpenJPEG.EncodeFromImage(joint, true); } - catch (Exception) + catch (Exception e) { - m_log.Error("[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); + m_log.ErrorFormat( + "[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Exception {0}{1}", + e.Message, e.StackTrace); } return result; diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 7316e5b..c061868 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -338,10 +338,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender { imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true); } - catch (Exception) + catch (Exception e) { - m_log.Error( - "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); + m_log.ErrorFormat( + "[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Exception {0}{1}", + e.Message, e.StackTrace); } m_textureManager.ReturnData(id, imageJ2000); -- cgit v1.1