When we try to open a file that doesn't exist, display an error in the command line...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 18 Nov 2008 17:20:16 +0000 (17:20 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 18 Nov 2008 17:20:16 +0000 (17:20 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2210 1f10aa63-cdf2-0310-b900-c93c546f37ac

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)
                        {