Class ExceptionsGenerator

java.lang.Object
org.kigalisim.engine.support.ExceptionsGenerator

public class ExceptionsGenerator extends Object
Generator for exceptions used in recalculation operations.
  • Constructor Details

    • ExceptionsGenerator

      public ExceptionsGenerator()
      Constructs a new ExceptionsGenerator.
  • Method Details

    • raiseNoAppOrSubstance

      public static void raiseNoAppOrSubstance(String operation, String suffix)
      Raise an exception for missing application or substance.
      Parameters:
      operation - The operation being attempted
      suffix - Additional suffix for the error message (usually " specified")
      Throws:
      RuntimeException - Always throws with formatted message
    • raiseSelfReplacement

      public static void raiseSelfReplacement(String substanceName)
      Raise an exception for attempted self-replacement.
      Parameters:
      substanceName - The name of the substance being self-replaced
      Throws:
      RuntimeException - Always throws with formatted message
    • raiseSelfDisplacement

      public static void raiseSelfDisplacement(String streamName)
      Raise an exception for attempted self-displacement.
      Parameters:
      streamName - The name of the stream being self-displaced
      Throws:
      RuntimeException - Always throws with formatted message