Class PreconditionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.graffiti.plugin.algorithm.PreconditionException
All Implemented Interfaces:
Serializable

public class PreconditionException
extends Exception
Throws in the context of precondition failures.
See Also:
Serialized Form
Recent revisions:
2.6.5
  • Constructor Details

    • PreconditionException

      public PreconditionException​(String msg)
      Creates a new PreconditionException object.
      Parameters:
      msg - error entry describing the cause
    • PreconditionException

      public PreconditionException()
      Creates a new PreconditionException object.
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Checks, if this PreconditionException contains any error entries.
      Returns:
      true, when there haven't been added any messages
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • add

      public void add​(String cause, Object source)
      Adds a new cause message, together with the responsible source.
      Parameters:
      cause - message about the reason
      source - an Object from which it originated the exception
    • add

      public void add​(String cause)
      Adds a new cause message without a source.
      Parameters:
      cause - message about the reason
    • iterator

      public Iterator<org.graffiti.plugin.algorithm.PreconditionException.Entry> iterator()
      Returns an iterator over all Errors.
      Returns:
      an iterator.