We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18c9c32 commit 7ef8894Copy full SHA for 7ef8894
1 file changed
src/scratchconfiguration.cpp
@@ -2,6 +2,7 @@
2
3
#include <scratchcpp/scratchconfiguration.h>
4
#include <scratchcpp/iimageformatfactory.h>
5
+#include <iostream>
6
7
#include "scratchconfiguration_p.h"
8
#include "blocks/standardblocks.h"
@@ -40,9 +41,12 @@ std::shared_ptr<IImageFormat> ScratchConfiguration::createImageFormat(const std:
40
41
{
42
auto it = impl->imageFormats.find(name);
43
- if (it == impl->imageFormats.cend())
44
- return std::make_shared<ImageFormatStub>(); // use stub if the format doesn't exist
45
- else
+ if (it == impl->imageFormats.cend()) {
+ 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
50
return it->second->createInstance();
51
}
52
0 commit comments