From 590fb1d22d56e1b171865fa9fa80f7d35ec4e26a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Wed, 12 Dec 2018 19:46:09 +0100 Subject: wip --- CrowIDE/src/DesignInterface.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'CrowIDE/src/DesignInterface.cs') diff --git a/CrowIDE/src/DesignInterface.cs b/CrowIDE/src/DesignInterface.cs index 7d9b8ad8..aa82c34d 100644 --- a/CrowIDE/src/DesignInterface.cs +++ b/CrowIDE/src/DesignInterface.cs @@ -84,13 +84,9 @@ namespace Crow.Coding public override GraphicObject Load (string path) { ProjectFile pi; - try { - - if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) - return CreateITorFromIMLFragment (pi.Source).CreateInstance(); - } catch (Exception ex) { - - } + + if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) + return CreateITorFromIMLFragment (pi.Source).CreateInstance(); return null; } @@ -100,9 +96,7 @@ namespace Crow.Coding if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi)) { return new FileStream (pi.AbsolutePath, FileMode.Open); } - - Console.WriteLine ("File not found: {0}", path); - return null; + throw new Exception ($"In Design File not found: {path}"); } public override bool ProcessMouseMove (int x, int y) { -- cgit v1.3.1-4-g156e