Fix unsupported format

This commit is contained in:
tovjemam 2025-12-05 14:46:56 +01:00
parent 9e103519d0
commit 77b1c36aab

View File

@ -78,8 +78,10 @@ static void Run(const std::string& inputFile, const std::string& outputFile, con
if (outputFile.ends_with(".svg"))
Render<SvgRenderer>(shapes, outputFile, width, height);
else
else if (outputFile.ends_with(".pgm"))
Render<PgmRenderer>(shapes, outputFile, width, height);
else
throw std::runtime_error("Unsupported output file format. Supported formats are .svg and .pgm");
std::cout << "OK" << std::endl;
std::cout << file.GetNumProcessedCmds() << std::endl;