Skip to content

Commit 1cf5784

Browse files
authored
Corrected simulation state nucleus error message (#317)
1 parent e92b3f6 commit 1cf5784

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Experiment.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ public Builder setExperimentParameterData(ExperimentParameterData experimentPara
146146
* Set the simulation state. Defaults to the current date and a start time of
147147
* zero.
148148
*
149-
* @throws ContractException {@link NucleusError#NULL_SIMULATION_TIME} if the
150-
* simulation time is null
149+
* @throws ContractException {@link NucleusError#NULL_SIMULATION_STATE} if the
150+
* simulation state is null
151151
*/
152152
public Builder setSimulationState(SimulationState simulationState) {
153153
ensureDataMutability();
154154
if (simulationState == null) {
155-
throw new ContractException(NucleusError.NULL_SIMULATION_TIME);
155+
throw new ContractException(NucleusError.NULL_SIMULATION_STATE);
156156
}
157157
data.simulationState = simulationState;
158158
return this;

simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/NucleusError.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public enum NucleusError implements ContractError {
6363
NULL_SCENARIO_ID("Null scenario id"),//
6464
NULL_SCENARIO_PROGRESS_FILE("Null scenario progress file"),//
6565
NULL_SIMULATION_CONTEXT("Null simulation context"),//
66-
NULL_SIMULATION_TIME("Null simulation time"),//
66+
NULL_SIMULATION_STATE("Null simulation state data"),//
6767
OBSERVATION_EVENT_IMPROPER_RELEASE("An observation event is being released during a mutation by a data manager without the use of a corresponding mutation event"),//
6868
PAST_PLANNING_TIME("Plan execution time is in the past"),//
6969
PLANNING_QUEUE_ACTIVE("The planning queue is still active and plans cannot be retrieved"),//

simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/Simulation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ public Builder setSimulationHaltTime(Double simulationHaltTime) {
9090
* Set the simulation state. Defaults to the current date and a start time of
9191
* zero.
9292
*
93-
* @throws ContractException {@link NucleusError#NULL_SIMULATION_TIME} if the
94-
* simulation time is null
93+
* @throws ContractException {@link NucleusError#NULL_SIMULATION_STATE} if the
94+
* simulation state is null
9595
*/
9696
public Builder setSimulationState(SimulationState simulationState) {
9797
if (simulationState == null) {
98-
throw new ContractException(NucleusError.NULL_SIMULATION_TIME);
98+
throw new ContractException(NucleusError.NULL_SIMULATION_STATE);
9999
}
100100
ensureDataMutability();
101101
data.simulationState = simulationState;

simulation/src/main/java/gov/hhs/aspr/ms/gcm/simulation/nucleus/testsupport/testplugin/TestSimulation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ public Builder setSimulationHaltTime(double simulationHaltTime) {
7474
* Set the simulation time. Defaults to the current date and a start time of
7575
* zero.
7676
*
77-
* @throws ContractException {@link NucleusError#NULL_SIMULATION_TIME} if the
78-
* simulation time is null
77+
* @throws ContractException {@link NucleusError#NULL_SIMULATION_STATE} if the
78+
* simulation state is null
7979
*/
8080
public Builder setSimulationState(SimulationState simulationState) {
8181
ensureDataMutability();
8282
if (simulationState == null) {
83-
throw new ContractException(NucleusError.NULL_SIMULATION_TIME);
83+
throw new ContractException(NucleusError.NULL_SIMULATION_STATE);
8484
}
8585
data.simulationState = simulationState;
8686
return this;

0 commit comments

Comments
 (0)