diff --git a/src/bin/svg2png/svg2png.cpp b/src/bin/svg2png/svg2png.cpp index 5a2d3448..849ed47e 100644 --- a/src/bin/svg2png/svg2png.cpp +++ b/src/bin/svg2png/svg2png.cpp @@ -69,9 +69,16 @@ public: //Picture auto picture = tvg::Picture::gen(); - if (picture->load(path) != tvg::Result::Success) { + tvg::Result result = picture->load(path); + if (result == tvg::Result::Unknown) { cout << "Error: Couldn't load image " << path << endl; return 1; + } else if (result == tvg::Result::InvalidArguments) { + cout << "Error: Couldn't load image(Invalid path or invalid SVG image) : " << path << endl; + return 1; + } else if (result == tvg::Result::NonSupport) { + cout << "Error: Couldn't load image(Not supported extension) : " << path << endl; + return 1; } if (w == 0 || h == 0) {