From d2e7c711b4188106a89f28d54ada3cd76c697705 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 21 Sep 2020 21:40:24 +0100 Subject: [PATCH] actually make yExceptionMessage and yExceptionTypeName avaiable --- .../ScriptEngine/YEngine/XMRInstAbstract.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs index 2fd9b9b403..1cdde7a81c 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs @@ -1198,24 +1198,44 @@ namespace OpenSim.Region.ScriptEngine.Yengine return ex.Message; } + public static string yExceptionMessage(Exception ex) + { + return ex.Message; + } + // Return stack trace (no type or message, just stack trace lines: at ... \n) public string xmrExceptionStackTrace(Exception ex) { return XMRExceptionStackString(ex); } + public string yExceptionStackTrace(Exception ex) + { + return XMRExceptionStackString(ex); + } + // Return value thrown by a throw statement public static object xmrExceptionThrownValue(Exception ex) { return ((ScriptThrownException)ex).thrown; } + public static object yExceptionThrownValue(Exception ex) + { + return ((ScriptThrownException)ex).thrown; + } + // Return exception's short type name, eg, NullReferenceException, ScriptThrownException, etc. public static string xmrExceptionTypeName(Exception ex) { return ex.GetType().Name; } + public static string yExceptionTypeName(Exception ex) + { + return ex.GetType().Name; + } + // internal use only: converts any IL addresses in script-defined methods to source location equivalent // Mono ex.StackTrace: // at OpenSim.Region.ScriptEngine.YEngine.TypeCast.ObjectToInteger (System.Object x) [0x0005e] in /home/kunta/opensim-0.9/addon-modules/YEngine/Module/MMRScriptTypeCast.cs:750