Fix unsupported format
This commit is contained in:
parent
9e103519d0
commit
77b1c36aab
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user