/// <summary> /// Fires an error occurred event. /// </summary> /// <param name="args">The arguments to pass on.</param> public void RaiseErrorOccurred(ParseErrorEventArgs args) { if (ErrorOccurred != null) { ErrorOccurred(this, args); } }
/// <summary> /// Fires an error occurred event (usually originated by another tokenizer). /// </summary> /// <param name="sender">The original sender.</param> /// <param name="eventArgs">The arguments of the event.</param> protected void RaiseErrorOccurred(Object sender, ParseErrorEventArgs eventArgs) { if (ErrorOccurred != null) { ErrorOccurred(sender, eventArgs); } }
/// <summary> /// Fires an error occurred event. /// </summary> /// <param name="code">The associated error code.</param> public void RaiseErrorOccurred(ErrorCode code) { if (ErrorOccurred != null) { var position = GetCurrentPosition(); var errorArguments = new ParseErrorEventArgs(code.GetCode(), code.GetMessage(), position); ErrorOccurred(this, errorArguments); } }
/// <summary> /// Fires an error occurred event. /// </summary> /// <param name="code">The associated error code.</param> protected void RaiseErrorOccurred(ErrorCode code) { if (ErrorOccurred != null) { var pck = new ParseErrorEventArgs((int)code, Errors.GetError(code)); pck.Line = _src.Line; pck.Column = _src.Column; ErrorOccurred(this, pck); } }