File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ static BGRColour parseJSONPaletteColour(const std::string& s)
135135static std::vector<BGRColour> parseColours (const nlohmann::json& jPalette)
136136{
137137 if (!jPalette.is_object ())
138- std::runtime_error (" parseColours expects parameter jPalette to be an object" );
138+ throw std::runtime_error (" parseColours expects parameter jPalette to be an object" );
139139
140140 auto jColours = jPalette[" colours" ];
141141 std::vector<BGRColour> out;
@@ -146,7 +146,7 @@ static std::vector<BGRColour> parseColours(const nlohmann::json& jPalette)
146146 for (auto & jColour : jColours)
147147 {
148148 if (!jColour.is_string ())
149- std::runtime_error (" Encountered a value that is not a string!" );
149+ throw std::runtime_error (" Encountered a value that is not a string!" );
150150
151151 out.push_back (parseJSONPaletteColour (jColour.get <std::string>()));
152152 }
You can’t perform that action at this time.
0 commit comments