From 955793a73eff1191da57a4e3b3446f761c39e7e1 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 18 Nov 2008 17:20:16 +0000 Subject: [PATCH] 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 --- synfig-core/trunk/src/tool/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) { -- 2.7.4