From: dooglus Date: Tue, 18 Nov 2008 17:20:16 +0000 (+0000) Subject: When we try to open a file that doesn't exist, display an error in the command line... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=955793a73eff1191da57a4e3b3446f761c39e7e1;hp=16993383da963eacb529bfdb7ded2a2de3173eea;p=synfig.git When we try to open a file that doesn't exist, display an error in the command line tool. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2210 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index 2fc8640..701bd67 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -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) {