Fixes exception in app-command creation

This commit is contained in:
Ben 2024-07-02 10:22:00 +02:00
parent 1e8f8106b0
commit c1ad97d26f
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
3 changed files with 4 additions and 1 deletions

View File

@ -70,6 +70,7 @@ namespace BiblioTech
{
var json = JsonConvert.SerializeObject(exception.Errors, Formatting.Indented);
log.Error(json);
throw exception;
}
log.Log("Initialized.");
}

View File

@ -224,7 +224,7 @@ namespace BiblioTech.Commands
public LogReplaceCommand(CustomReplacement replacement)
: base(name: "logreplace",
description: "Replaces all occurances of 'from' with 'to' in ChainEvent messages. Leave 'to' empty to remove a replacement.")
description: "Replaces all 'from' with 'to' in ChainEvents.")
{
this.replacement = replacement;
}

View File

@ -10,6 +10,8 @@ namespace BiblioTech.Options
Description = description;
Type = type;
IsRequired = isRequired;
if (Description.Length > 100) throw new Exception("Description for option " + name + " too long!");
}
public string Name { get; }