Get some hopefully more useful exception information when OpenJPEG.EncodeFromImage() fails in VectorRender and DynamicTexture modules

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-11-02 18:40:49 +00:00
parent 03993d0b14
commit 72923134e9
2 changed files with 8 additions and 5 deletions

View File

@ -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;

View File

@ -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);