mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
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:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user