Class ConfigWriteRefusedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.ultikits.ultitools.config.ConfigWriteRefusedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConfigEntryPresenceException

public class ConfigWriteRefusedException extends IOException
Thrown when an explicit configuration write - an operator's change written through AbstractConfigEntity#saveOperatorChange, AbstractConfigEntity#saveOperatorMapEntry or a panel edit - is refused by the framework's configuration write gate, so that nothing was written.

The gate refuses rather than overwrite what an operator wrote (maintainer decision of 2026-10-04: operator-written configuration is never overwritten automatically): a file it cannot read or parse, a file using YAML anchors, aliases or merge keys, a layout the write could not keep byte for byte outside the keys it changes, or a file that changed while the write was being prepared. The file keeps its bytes and the in-memory value the module set stays as it is; getReason() names why, as a phrase without any configuration value, so it can be shown to the operator.

Since:
6.3.0
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • file

      private final String file
    • reason

      private final String reason
  • Constructor Details

    • ConfigWriteRefusedException

      public ConfigWriteRefusedException(String file, String reason)
      Creates the exception for one refused write.
      Parameters:
      file - the configuration file that was not written, as it should be named to the operator
      reason - why it was not written, as a phrase without any configuration value
  • Method Details

    • getFile

      public String getFile()
      The configuration file that was not written.
      Returns:
      the file, as named in the message
    • getReason

      public String getReason()
      Why the write was refused, as a phrase without any configuration value.
      Returns:
      the reason