aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 64da67e..544dce4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -212,9 +212,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
212 internal void OSSLError(string msg) 212 internal void OSSLError(string msg)
213 { 213 {
214 if (m_debuggerSafe) 214 if (m_debuggerSafe)
215 {
216 OSSLShoutError(msg); 215 OSSLShoutError(msg);
217 }
218 else 216 else
219 { 217 {
220 throw new ScriptException("OSSL Runtime Error: " + msg); 218 throw new ScriptException("OSSL Runtime Error: " + msg);
@@ -258,20 +256,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
258 public void CheckThreatLevel() 256 public void CheckThreatLevel()
259 { 257 {
260 if (!m_OSFunctionsEnabled) 258 if (!m_OSFunctionsEnabled)
261 OSSLError(String.Format("{0} permission denied. All OS functions are disabled.")); // throws 259 throw new ScriptException(String.Format("{0} permission denied. All OS functions are disabled."));
262 } 260 }
263 261
264 // Returns if the function is allowed. Throws a script exception if not allowed. 262 // Returns if the function is allowed. Throws a script exception if not allowed.
265 public void CheckThreatLevel(ThreatLevel level, string function) 263 public void CheckThreatLevel(ThreatLevel level, string function)
266 { 264 {
267 if (!m_OSFunctionsEnabled) 265 if (!m_OSFunctionsEnabled)
268 OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws 266 throw new ScriptException(String.Format("{0} permission denied. All OS functions are disabled.", function));
269 267
270 string reasonWhyNot = CheckThreatLevelTest(level, function); 268 string reasonWhyNot = CheckThreatLevelTest(level, function);
271 if (!String.IsNullOrEmpty(reasonWhyNot)) 269 if (!String.IsNullOrEmpty(reasonWhyNot))
272 { 270 throw new ScriptException(reasonWhyNot);
273 OSSLError(reasonWhyNot);
274 }
275 } 271 }
276 272
277 // Check to see if function is allowed. Returns an empty string if function permitted 273 // Check to see if function is allowed. Returns an empty string if function permitted