public static ScriptException CreateScriptException(object payload, SourceInfo location, ScriptStackTrace stack) => new ScriptException(payload as string ?? "ScriptException", null, location, stack) { Payload = payload };
public ScriptException(string message, Exception inner, SourceInfo location, ScriptStackTrace stack) : base(message, inner) { Location = location; ScriptStackTrace = stack; }