actually make yExceptionMessage and yExceptionTypeName avaiable

This commit is contained in:
UbitUmarov
2020-09-21 21:40:24 +01:00
parent e6e4e2129b
commit d2e7c711b4

View File

@@ -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