From cd3b05a3f65c13b9cf6c347ce1a8b9acaa5152fc Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 31 Oct 2018 09:05:44 -0500 Subject: [PATCH] Moving error message block into if-else. --- src/plot.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plot.cpp b/src/plot.cpp index d6f54b90a..aa649c531 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -183,17 +183,16 @@ Plot::set_type(pugi::xml_node plot_node) // set type using node value if (type_str == "slice") { type_ = PlotType::slice; - return; } else if (type_str == "voxel") { type_ = PlotType::voxel; - return; - } + } else { // if we're here, something is wrong std::stringstream err_msg; err_msg << "Unsupported plot type '" << type_str << "' in plot " << id_; fatal_error(err_msg.str()); + } } }