Class InconsistentIngredientInsertionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.cyclops.cyclopscore.ingredient.storage.InconsistentIngredientInsertionException
All Implemented Interfaces:
Serializable

public class InconsistentIngredientInsertionException extends Exception
An exception that can be thrown when ingredients are being moved, and some ingredient could not be inserted into a destination storage, even though the simulation declared that this insertion would be allowed. This is typically thrown when the remainder ingredient has nowhere else to go, and should be handled exceptionally to avoid it going lost.
See Also:
  • Constructor Details

  • Method Details

    • getIngredientComponent

      public <T, M> IngredientComponent<T,M> getIngredientComponent()
    • getDestination

      public <T, M> IIngredientComponentStorage<T,M> getDestination()
    • getRemainder

      public <T> T getRemainder()
      Type Parameters:
      T - The instance type.
      Returns:
      The instance that could not be re-inserted and would be lost.
    • getMovedActual

      public <T> T getMovedActual()
      Type Parameters:
      T - The instance type.
      Returns:
      The instance that was successfully moved.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable