namespace F4SD.DocuEngine.DocuEngineParser { internal class SyntaxErrorException : DocuEngineParserException { private const string errorMessageTemplate = "<>"; private const string defaultMessage = "You're syntax is wrong. Get good."; public SyntaxErrorException(string currentText) : base(defaultMessage) { CurrentText = currentText; } public SyntaxErrorException(string expected, string actual) : base(defaultMessage) { PrintedErrorMessage = string.Format(errorMessageTemplate, expected, actual); } public SyntaxErrorException(string currentText, string expected, string actual) : base(defaultMessage) { CurrentText = currentText; PrintedErrorMessage = string.Format(errorMessageTemplate, expected, actual); } public override void AddToCurrentText(string text) { CurrentText = text + CurrentText; } } }