Skip to content

Commit cfdabb0

Browse files
committed
FEAT: Check if dt was specified for each output type (better error handling)
1 parent d1137ee commit cfdabb0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/output.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,14 @@ bool output(const Neutrals &neutrals,
8787

8888
for (int iOutput = 0; iOutput < nOutputs; iOutput++) {
8989

90-
if (time.check_time_gate(input.get_dt_output(iOutput))) {
90+
// make sure the output dt is set correctly. Otherwise these errors aren't caught correctly.
91+
precision_t dt_output = input.get_dt_output(iOutput);
92+
if (dt_output == 0.0){
93+
report.exit(function);
94+
return false;
95+
}
96+
97+
if (time.check_time_gate(dt_output)) {
9198

9299
// ------------------------------------------------------------
93100
// Store time in all of the files:

0 commit comments

Comments
 (0)