Class NodeFormatException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SealedNodeException

public class NodeFormatException extends RuntimeException
A refusal by the node layer (PD-N-04, PD-N-06): the node is over a bound, a link names a codec the decoder does not know, the kind is unknown, a key falls outside the kind's schema, or the bytes do not hash to the CID they claim. The exception carries the CID when the caller knew it and the rule that refused.
See Also:
  • Constructor Details

    • NodeFormatException

      public NodeFormatException(String rule)
      A refusal of bytes whose CID the caller did not know.
      Parameters:
      rule - the rule that refused, named for the operator
    • NodeFormatException

      public NodeFormatException(String cid, String rule)
      A refusal of a named node.
      Parameters:
      cid - the CID of the node, or null when unknown
      rule - the rule that refused, named for the operator
    • NodeFormatException

      public NodeFormatException(String cid, String rule, Throwable cause)
      A refusal of a named node with an underlying cause.
      Parameters:
      cid - the CID of the node, or null when unknown
      rule - the rule that refused, named for the operator
      cause - the cause, or null
  • Method Details

    • cid

      public String cid()
      The CID of the refused node, or null when the caller did not know it.
    • rule

      public String rule()
      The rule that refused.
    • withCid

      public NodeFormatException withCid(String cid)
      A copy of this exception that names the CID, when this one does not.