namespace F4SD.DocuEngine.DocuEngineParser { internal class VariableErrorException : DocuEngineParserException { private const string errorMessageTemplate = "<>"; private const string defaultMessage = "Your variable is the wrong type. Get good."; public VariableErrorException(string currentText) : base(defaultMessage) { CurrentText = currentText; } public VariableErrorException(string expected, string actual) : base(defaultMessage) { PrintedErrorMessage = string.Format(errorMessageTemplate, expected, actual); } public VariableErrorException(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; } } }