Ejemplo n.º 1
0
 private static string MakeMessage(string context, Mark contextMark,
     string problem, Mark problemMark, string note)
 {
     var lines = new List<string>();
     if (context != null)
         lines.Add(context);
     if (contextMark != null
         && (problem == null
          || problemMark == null
          || contextMark.Name != problemMark.Name
          || contextMark.Line != problemMark.Line
          || contextMark.Column != problemMark.Column))
         lines.Add(contextMark.ToString());
     if (problem != null)
         lines.Add(problem);
     if (problemMark != null)
         lines.Add(problemMark.ToString());
     if (note != null)
         lines.Add(note);
     return string.Join("\n", lines);
 }
Ejemplo n.º 2
0
 public Error(string context = null, Mark contextMark = null,
     string problem = null, Mark problemMark = null, string note = null)
     : base(context, contextMark, problem, problemMark, note)
 {
 }
Ejemplo n.º 3
0
 public MarkedYamlError(string context = null, Mark contextMark = null,
     string problem = null, Mark problemMark = null, string note = null)
     : base(MakeMessage(context, contextMark, problem, problemMark, note))
 {
 }