Beispiel #1
0
        /// <summary>
        /// Regenerates the textual version of the call in this frame
        /// </summary>
        /// <param name="unifications">Binding list currently in effect.  This will generally be whatever the most recent binding list of the interpreter is.</param>
        public string GetCallSourceText(BindingList <LogicVariable> unifications)
        {
            var source = Call.CallSourceText(Method.Task, Arglist, unifications);

            if (Method.FilePath == null)
            {
                return(source);
            }
            var start = Module.RichTextStackTraces ? "\n     <i>" : "(";
            var end   = Module.RichTextStackTraces ? "</i>" : ")";

            return($"{source} {start}at {Path.GetFileName(Method.FilePath)}:{Method.LineNumber}{end}");
        }
Beispiel #2
0
 /// <inheritdoc />
 public ArgumentTypeException(object task, Type expected, object actual, object[] arglist)
     : base(task, arglist, $"Wrong argument type in call to {task}, expected {TypeName(expected)}, got {actual??"null"} in {Call.CallSourceText(task, arglist)}")
 {
 }