コード例 #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));
        }