Пример #1
0
 /// <summary>
 /// Adds the specified DdlReaderError at the end of the error list.
 /// </summary>
 public void AddError(DdlReaderError error)
 {
     this.errors.Add(error);
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the DdlReaderError.
 /// </summary>
 public DdlParserException(DdlReaderError error)
     : base(error.ErrorMessage)
 {
     _error = error;
 }
Пример #3
0
 /// <summary>
 /// Adds the specified DdlReaderError at the end of the error list.
 /// </summary>
 public void AddError(DdlReaderError error)
 {
     _errors.Add(error);
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the specified message and the
 /// inner exception.
 /// </summary>
 public DdlParserException(string message, Exception innerException)
     : base(message, innerException)
 {
     _error = new DdlReaderError(DdlErrorLevel.Error, message, 0);
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the specified error level, name,
 /// error code and message.
 /// </summary>
 public DdlParserException(DdlErrorLevel level, string message, DomMsgID errorCode)
     : base(message)
 {
     _error = new DdlReaderError(level, message, (int)errorCode);
 }
Пример #6
0
        /// <summary>
        /// Creates an ErrorInfo based on the given inner exception, error and parms and adds it to the ErrorManager2.
        /// </summary>
        private void ReportParserException(Exception innerException, DomMsgID errorCode, params string[] parms)
        {
            string message = "";
            if (innerException != null)
                message = ": " + innerException;

            message += DomSR.FormatMessage(errorCode, parms);
            DdlReaderError error = new DdlReaderError(DdlErrorLevel.Error, message, (int)errorCode,
              _scanner.DocumentFileName, _scanner.CurrentLine, _scanner.CurrentLinePos);

            _errors.AddError(error);
        }
Пример #7
0
        /// <summary>
        /// Creates an ErrorInfo based on the DomMsgID and the specified parameters.
        /// Throws a DdlParserException with that ErrorInfo.
        /// </summary>
        private void ThrowParserException(DomMsgID errorCode, params object[] parms)
        {
            string message = DomSR.FormatMessage(errorCode, parms);
            DdlReaderError error = new DdlReaderError(DdlErrorLevel.Error, message, (int)errorCode,
              _scanner.DocumentFileName, _scanner.CurrentLine, _scanner.CurrentLinePos);

            throw new DdlParserException(error);
        }
Пример #8
0
        /// <summary>
        /// Creates an ErrorInfo based on the given errorlevel, error and parms and adds it to the ErrorManager2.
        /// </summary>
        private void ReportParserInfo(DdlErrorLevel level, DomMsgID errorCode, params string[] parms)
        {
            string message = DomSR.FormatMessage(errorCode, parms);
            DdlReaderError error = new DdlReaderError(level, message, (int)errorCode,
              _scanner.DocumentFileName, _scanner.CurrentLine, _scanner.CurrentLinePos);

            _errors.AddError(error);
        }
Пример #9
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the DdlReaderError.
 /// </summary>
 public DdlParserException(DdlReaderError error)
     : base(error.ErrorMessage)
 {
     this.error = error;
 }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the specified error level, name,
 /// error code and message.
 /// </summary>
 public DdlParserException(DdlErrorLevel level, string message, DomMsgID errorCode)
     : base(message)
 {
     this.error = new DdlReaderError(level, message, (int)errorCode);
 }
Пример #11
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the specified message and the
 /// inner exception.
 /// </summary>
 public DdlParserException(string message, Exception innerException)
     : base(message, innerException)
 {
     this.error = new DdlReaderError(DdlErrorLevel.Error, message, 0);
 }
Пример #12
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the specified message.
 /// </summary>
 public DdlParserException(string message)
     : base(message)
 {
     _error = new DdlReaderError(DdlErrorLevel.Error, message, 0);
 }