Revision: 2210
          http://synfig.svn.sourceforge.net/synfig/?rev=2210&view=rev
Author:   dooglus
Date:     2008-11-18 17:20:16 +0000 (Tue, 18 Nov 2008)

Log Message:
-----------
When we try to open a file that doesn't exist, display an error in the command 
line tool.

Modified Paths:
--------------
    synfig-core/trunk/src/tool/main.cpp

Modified: synfig-core/trunk/src/tool/main.cpp
===================================================================
--- synfig-core/trunk/src/tool/main.cpp 2008-11-18 17:19:57 UTC (rev 2209)
+++ synfig-core/trunk/src/tool/main.cpp 2008-11-18 17:20:16 UTC (rev 2210)
@@ -1175,7 +1175,14 @@
 
                        // 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)
                        {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to