Add a message according to the returned Result type.
Change-Id: Ic456f871c48970a7c480e85efa33a219a44ad908
//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) {