Refactor quick action output handling and extend case note support

This commit is contained in:
Meik
2026-07-17 18:34:59 +02:00
parent 1db0da9a40
commit 0fef3ad49c
32 changed files with 755 additions and 805 deletions

View File

@@ -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);
}
}

View File

@@ -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;
}
}
}

View File

@@ -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;
}
}
}