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 voidRaise an exception for attempted initial charge on newEquipment.static voidRaise an exception for attempted replace on newEquipment.static 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
-
raiseNewEquipmentInitialCharge
public static void raiseNewEquipmentInitialCharge()Raise an exception for attempted initial charge on newEquipment.- Throws:
RuntimeException- Always throws with formatted message
-
raiseNewEquipmentReplace
public static void raiseNewEquipmentReplace()Raise an exception for attempted replace on newEquipment.- Throws:
RuntimeException- Always throws with formatted message
-