Package org.kigalisim.engine.support
Class ExceptionsGenerator
java.lang.Object
org.kigalisim.engine.support.ExceptionsGenerator
Generator for exceptions used in recalculation operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidraiseNoAppOrSubstance(String operation, String suffix) Raise an exception for missing application or substance.static voidraiseSelfDisplacement(String streamName) Raise an exception for attempted self-displacement.static voidraiseSelfReplacement(String substanceName) Raise an exception for attempted self-replacement.
-
Constructor Details
-
ExceptionsGenerator
public ExceptionsGenerator()Constructs a new ExceptionsGenerator.
-
-
Method Details
-
raiseNoAppOrSubstance
Raise an exception for missing application or substance.- Parameters:
operation- The operation being attemptedsuffix- Additional suffix for the error message (usually " specified")- Throws:
RuntimeException- Always throws with formatted message
-
raiseSelfReplacement
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
Raise an exception for attempted self-displacement.- Parameters:
streamName- The name of the stream being self-displaced- Throws:
RuntimeException- Always throws with formatted message
-