From f93fdfa5af0a8dd39f471a97a55209451f7ca7a0 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 6 Feb 2008 15:30:02 +0000 Subject: * Marking off which uses of catch (Exception e) is legit and which are not, for later removal/replacement. --- OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 4 ++-- OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 6 +++--- OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs | 2 +- OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs | 6 +++--- OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 2f985e4..10959c5 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -318,7 +318,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { File.Delete(OutFile); } - catch (Exception e) + catch (Exception e) // NOTLEGIT - Should be just catching FileIOException { //m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); throw new Exception("Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); @@ -335,7 +335,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL Path.Combine("ScriptEngines", srcFileName), Script); } - catch (Exception ex) + catch (Exception ex) // NOTLEGIT - Should be just catching FileIOException { m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception while trying to write script source to file \"" + srcFileName + "\": " + ex.ToString()); } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index c39d376..b407f8d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // Fire the first start-event m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); } - catch (Exception e) + catch (Exception e) // LEGIT: User Scripting { //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); try @@ -117,7 +117,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } - catch (Exception e2) + catch (Exception e2) // LEGIT: User Scripting { m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Error displaying error in-world: " + e2.ToString()); m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + @@ -154,7 +154,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // Tell AppDomain that we have stopped script m_scriptEngine.m_AppDomainManager.StopScript(ad); } - catch (Exception e) + catch (Exception e) // LEGIT: User Scripting { m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + ": " + e.ToString()); diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs index efe8648..e1fff5c 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs @@ -365,7 +365,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO bytes[i] = br.ReadByte(); return bytes; } - catch (Exception e) + catch (Exception e) // NOTLEGIT: No user related exceptions throwable here? { Common.SendToDebug("Exception: " + e.ToString()); throw (e); diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index db81487..f10a11f 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs @@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine // Fire the first start-event m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); } - catch (Exception e) + catch (Exception e) // LEGIT - User Script Compilation { //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); try @@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } - catch (Exception e2) + catch (Exception e2) // LEGIT - User Scripting { m_scriptEngine.Log.Error("[ScriptEngine]: Error displaying error in-world: " + e2.ToString()); m_scriptEngine.Log.Error("[ScriptEngine]: " + @@ -146,7 +146,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine // Tell AppDomain that we have stopped script m_scriptEngine.m_AppDomainManager.StopScript(ad); } - catch (Exception e) + catch (Exception e) // LEGIT - Problems caused by User Scripting { Console.WriteLine("Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + ": " + e.ToString()); diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index f722f12..248549e 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -681,7 +681,7 @@ namespace OpenSim.Region.Terrain } return true; } - catch (Exception e) + catch (Exception e) // SEMI-LEGIT: Catching problems caused by user input or scripts { resultText = "Error running terrain command: " + e.ToString(); return false; @@ -1343,7 +1343,7 @@ namespace OpenSim.Region.Terrain bmp.Save(filename, ImageFormat.Png); } - catch (Exception e) + catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke { Console.WriteLine("Failed generating terrain map: " + e.ToString()); } @@ -1362,7 +1362,7 @@ namespace OpenSim.Region.Terrain imageData = OpenJPEG.EncodeFromImage(bmp, true); } - catch (Exception e) + catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke { Console.WriteLine("Failed generating terrain map: " + e.ToString()); } -- cgit v1.1