Refactor quick action output handling and extend case note support
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace F4SD.DocuEngine.DocuEngineParser
|
||||
{
|
||||
internal abstract class DocuEngineParserException : Exception
|
||||
{
|
||||
public string CurrentText { get; protected set; }
|
||||
public string PrintedErrorMessage { get; protected set; }
|
||||
public DocuEngineParserException(string message) : base(message)
|
||||
{
|
||||
|
||||
}
|
||||
public abstract void AddToCurrentText(string text);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
namespace F4SD.DocuEngine.DocuEngineParser
|
||||
{
|
||||
internal class SyntaxErrorException : DocuEngineParserException
|
||||
{
|
||||
private const string errorMessageTemplate = "<<Syntax Error | Expected Characters: \"{0}\" | Actual Characters: \"{1}\">>";
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
namespace F4SD.DocuEngine.DocuEngineParser
|
||||
{
|
||||
internal class VariableErrorException : DocuEngineParserException
|
||||
{
|
||||
private const string errorMessageTemplate = "<<Variable Error | \"{0}\" can't be converted to type \"{1}\">>";
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user