When scripts generate expected exceptions (e.g. due to checked bad parameter) throw ScriptException instead of just a plain old exception.

This is to make it easier to distinguish these exceptions from unexpected OpenSimulator problems internally and in regression tests.
No functional changes.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-10-25 02:52:20 +01:00
parent ae662b54ea
commit d9aaf51561
5 changed files with 52 additions and 9 deletions

View File

@@ -10685,12 +10685,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
internal void Deprecated(string command)
{
throw new Exception("Command deprecated: " + command);
throw new ScriptException("Command deprecated: " + command);
}
internal void LSLError(string msg)
{
throw new Exception("LSL Runtime Error: " + msg);
throw new ScriptException("LSL Runtime Error: " + msg);
}
public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);

View File

@@ -95,13 +95,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
internal void MODError(string msg)
{
throw new Exception("MOD Runtime Error: " + msg);
throw new ScriptException("MOD Runtime Error: " + msg);
}
//
//Dumps an error message on the debug console.
//
/// <summary>
/// Dumps an error message on the debug console.
/// </summary>
/// <param name='message'></param>
internal void MODShoutError(string message)
{
if (message.Length > 1023)

View File

@@ -210,7 +210,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
internal void OSSLError(string msg)
{
throw new Exception("OSSL Runtime Error: " + msg);
throw new ScriptException("OSSL Runtime Error: " + msg);
}
/// <summary>