public static FileFormatException Create(string message, JToken value, string path) { var lineInfo = (IJsonLineInfo)value; var ex = new FileFormatException(message); return(ex.WithFilePath(path).WithLineInfo(lineInfo)); }
internal static FileFormatException Create(Exception exception, int line, int column, string path) { var message = string.Format(CultureInfo.CurrentCulture, Strings.Log_ErrorReadingProjectJsonWithLocation, path, line, column, exception.Message); var ex = new FileFormatException(message, exception); return(ex.WithFilePath(path).WithLineInfo(line, column)); }
public static FileFormatException Create(Exception exception, JToken value, string path) { var lineInfo = (IJsonLineInfo)value; var message = string.Format(CultureInfo.CurrentCulture, Strings.Log_ErrorReadingProjectJsonWithLocation, path, lineInfo.LineNumber, lineInfo.LinePosition, exception.Message); var ex = new FileFormatException(message, exception); return(ex.WithFilePath(path).WithLineInfo(lineInfo)); }
internal static FileFormatException Create(string message, int line, int column, string path) { var ex = new FileFormatException(message); return(ex.WithFilePath(path).WithLineInfo(line, column)); }