Package io.permazen

Class UpgradeConversionException

All Implemented Interfaces:
Serializable

public class UpgradeConversionException extends DatabaseException
Exception thrown when an object is upgraded, some simple field's type changes, the field is configured with UpgradeConversionPolicy.REQUIRE, and automated conversion of the field's value to the new type fails.
See Also:
  • Constructor Details

    • UpgradeConversionException

      public UpgradeConversionException(ObjId id, String fieldName, String message)
      Constructor.
      Parameters:
      id - ID of the object being upgraded
      fieldName - the name of the field
      message - exception message
    • UpgradeConversionException

      public UpgradeConversionException(ObjId id, String fieldName, String message, Throwable cause)
      Constructor.
      Parameters:
      id - ID of the object being upgraded
      fieldName - the name of the field
      message - exception message
      cause - underlying exception, or null if none
      Throws:
      IllegalArgumentException - if id or fieldName is null
  • Method Details

    • getObjId

      public ObjId getObjId()
      Get the ID of the object containing the field whose value could not be converted.
      Returns:
      object ID
    • getFieldName

      public String getFieldName()
      Get the name of the field from which the old value could not be converted.
      Returns:
      the name of the field