tools svg2tvg: ++exception handling.
authorHermet Park <chuneon.park@samsung.com>
Tue, 2 Nov 2021 05:38:09 +0000 (14:38 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 4 Nov 2021 00:38:12 +0000 (09:38 +0900)
skip to process if the input is invalid.

src/bin/svg2tvg/svg2tvg.cpp

index 4924aac..578409e 100644 (file)
@@ -146,6 +146,10 @@ int main(int argc, char **argv)
     for (auto input : inputs) {
 
         auto path = getpath(input);
+        if (!path) {
+            cout << "Invalid file or path name: \"" << input << "\"" << endl;
+            continue;
+        }
 
         if (auto dir = opendir(path)) {
             //load from directory