Skip to content

Commit 1c8ef5f

Browse files
authored
Merge branch 'main' into bug/SLL
2 parents a78b301 + e3b5412 commit 1c8ef5f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/cpp/hyperbolic1D_upwind.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ int main()
124124
scriptFile.close();
125125

126126
// Run GNUplot with the script
127-
system("gnuplot -persistent gp_script");
127+
int status = std::system("gnuplot -persistent gp_script");
128+
129+
if ( status != 0 ) {
130+
std::cerr << "Error executing GNUplot.\n";
131+
return EXIT_FAILURE;
132+
}
133+
134+
128135
return EXIT_SUCCESS;
129136
}

0 commit comments

Comments
 (0)