When we try to open a file that doesn't exist, display an error in the command line...
[synfig.git] / synfig-core / trunk / src / tool / main.cpp
index 2fc8640..701bd67 100644 (file)
@@ -1175,7 +1175,14 @@ int main(int argc, char *argv[])
 
                        // Open the composition
                        String errors, warnings;
-                       job_list.front().root=open_canvas(job_list.front().filename, errors, warnings);
+                       try
+                       {
+                               job_list.front().root=open_canvas(job_list.front().filename, errors, warnings);
+                       }
+                       catch(runtime_error x)
+                       {
+                               job_list.front().root = 0;
+                       }
 
                        if(!job_list.front().root)
                        {