package xyz.upperlevel.uppercore.message;

import lombok.Getter;
import xyz.upperlevel.uppercore.config.exceptions.InvalidConfigurationException;

@Getter
public class IllegalMessageConfigException extends IllegalStateException {
    private final String path;
    private final String messagePath;

    public IllegalMessageConfigException(String path, String message) {
        super("Cannot find message '" + path + '.' + message + "'!");
        this.path = path;
        this.messagePath = message;
    }

    public IllegalMessageConfigException(String path) {
        super("Cannot find message section '" + path + "'!");
        this.path = path;
        this.messagePath = null;
    }

    public IllegalMessageConfigException(String path, String message, InvalidConfigurationException e) {
        super("Error in message '" + path + '.' + message + "': " + e.getConfigError());
        this.path = path;
        this.messagePath = message;
    }

    public IllegalMessageConfigException(String path, InvalidConfigurationException e) {
        super("Error in message section '" + path + "': " + e.getConfigError());
        this.path = path;
        this.messagePath = null;
    }
}

@@ -396,32 +396,55 @@
 ind message '%22 +
+ (path.isEmpty() ? %22%22 :
  path + '.' + me
@@ -430,32 +430,33 @@
  %22%22 : path + '.'
+)
  + message + %22'!
@@ -849,24 +849,47 @@
 message '%22 +
+ (path.isEmpty() ? %22%22 :
  path + '.' 
@@ -887,16 +887,17 @@
 th + '.'
+)
  + messa

Enhance message errors