File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 22
33#include < scratchcpp/scratchconfiguration.h>
44#include < scratchcpp/iimageformatfactory.h>
5+ #include < iostream>
56
67#include " scratchconfiguration_p.h"
78#include " blocks/standardblocks.h"
@@ -40,9 +41,12 @@ std::shared_ptr<IImageFormat> ScratchConfiguration::createImageFormat(const std:
4041{
4142 auto it = impl->imageFormats .find (name);
4243
43- if (it == impl->imageFormats .cend ())
44- return std::make_shared<ImageFormatStub>(); // use stub if the format doesn't exist
45- else
44+ if (it == impl->imageFormats .cend ()) {
45+ std::cerr << " Unsupported image format: " << name << std::endl;
46+
47+ // Use stub if the format doesn't exist
48+ return std::make_shared<ImageFormatStub>();
49+ } else
4650 return it->second ->createInstance ();
4751}
4852
You can’t perform that action at this time.
0 commit comments