/// <summary> /// Construct a ParseException object with the given message and error code. /// </summary> /// <param name="message">A string describing the type of error that occurred.</param> /// <param name="error">The error that has occurred.</param> /// <param name="rules">The input rules string.</param> /// <param name="pos">The position of error in the rules string.</param> /// <param name="lineNumber"> /// The line number at which the error has occurred. /// If the parse engine is not using this field, it should set it to zero. Otherwise /// it should be a positive integer. The default value of this field /// is -1. It will be set to 0 if the code populating this struct is not /// using line numbers. /// </param> /// <stable>ICU 2.8</stable> public StringPrepParseException(string message, StringPrepErrorType error, string rules, int pos, int lineNumber) : base(message) { this.error = error; SetContext(rules, pos); this.line = lineNumber; }
/// <summary> /// Construct a ParseException object with the given message /// and error code /// </summary> /// <param name="message">A string describing the type of error that occurred.</param> /// <param name="error">The error that has occurred.</param> /// <stable>ICU 2.8</stable> public StringPrepParseException(string message, StringPrepErrorType error) : base(message) { this.error = error; this.line = 0; }