diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 61da6ef..c39d376 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -60,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
60 | 61 | ||
61 | public override void _StartScript(uint localID, LLUUID itemID, string Script) | 62 | public override void _StartScript(uint localID, LLUUID itemID, string Script) |
62 | { | 63 | { |
63 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); | 64 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); |
64 | 65 | ||
65 | 66 | ||
66 | //IScriptHost root = host.GetRoot(); | 67 | //IScriptHost root = host.GetRoot(); |
@@ -85,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
85 | CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); | 86 | CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); |
86 | 87 | ||
87 | #if DEBUG | 88 | #if DEBUG |
88 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before); | 89 | m_scriptEngine.Log.Debug(String.Format("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before)); |
89 | #endif | 90 | #endif |
90 | 91 | ||
91 | CompiledScript.Source = Script; | 92 | CompiledScript.Source = Script; |
@@ -106,7 +107,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
106 | } | 107 | } |
107 | catch (Exception e) | 108 | catch (Exception e) |
108 | { | 109 | { |
109 | //m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString()); | 110 | //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); |
110 | try | 111 | try |
111 | { | 112 | { |
112 | // DISPLAY ERROR INWORLD | 113 | // DISPLAY ERROR INWORLD |
@@ -118,9 +119,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
118 | } | 119 | } |
119 | catch (Exception e2) | 120 | catch (Exception e2) |
120 | { | 121 | { |
121 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Error displaying error in-world: " + e2.ToString()); | 122 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Error displaying error in-world: " + e2.ToString()); |
122 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 123 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
123 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); | 124 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); |
124 | } | 125 | } |
125 | } | 126 | } |
126 | } | 127 | } |
@@ -129,7 +130,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
129 | { | 130 | { |
130 | // Stop script | 131 | // Stop script |
131 | #if DEBUG | 132 | #if DEBUG |
132 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Stop script localID: " + localID + " LLUID: " + itemID.ToString()); | 133 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Stop script localID: " + localID + " LLUID: " + itemID.ToString()); |
133 | #endif | 134 | #endif |
134 | 135 | ||
135 | // Stop long command on script | 136 | // Stop long command on script |
@@ -142,7 +143,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
142 | // TEMP: First serialize it | 143 | // TEMP: First serialize it |
143 | //GetSerializedScript(localID, itemID); | 144 | //GetSerializedScript(localID, itemID); |
144 | 145 | ||
145 | |||
146 | try | 146 | try |
147 | { | 147 | { |
148 | // Get AppDomain | 148 | // Get AppDomain |
@@ -156,10 +156,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
156 | } | 156 | } |
157 | catch (Exception e) | 157 | catch (Exception e) |
158 | { | 158 | { |
159 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + | 159 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + |
160 | ": " + e.ToString()); | 160 | ": " + e.ToString()); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | |||
164 | } | 163 | } |
165 | } \ No newline at end of file | 164 | } |