Ejemplo n.º 1
0
 /// <summary>
 /// Adds the specified DdlReaderError at the end of the error list.
 /// </summary>
 public void AddError(DdlReaderError error)
 {
     this.errors.Add(error);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the DdlParserException class with the DdlReaderError.
 /// </summary>
 public DdlParserException(DdlReaderError error)
     : base(error.ErrorMessage)
 {
     _error = error;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds the specified DdlReaderError at the end of the error list.
 /// </summary>
 public void AddError(DdlReaderError error)
 {
     _errors.Add(error);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }