예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #4
0
        internal static FileFormatException Create(string message, int line, int column, string path)
        {
            var ex = new FileFormatException(message);

            return(ex.WithFilePath(path).WithLineInfo(line, column));
        }