From 64cd2506f789813ddea2159c1ac658f16e09f4bb Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 2 Aug 2016 00:04:28 +0200 Subject: Show xml file path for exceptions during loading. modifié : src/Interface.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Interface.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Interface.cs') diff --git a/src/Interface.cs b/src/Interface.cs index 07797a10..607044d9 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -219,8 +219,12 @@ namespace Crow Interface.XmlLoaderCount ++; CurrentGOMLPath = path; GraphicObject tmp = null; - using (Stream stream = GetStreamFromPath (path)) { - tmp = Load(stream, GetTopContainerOfXMLStream(stream), hostClass); + try { + using (Stream stream = GetStreamFromPath (path)) { + tmp = Load(stream, GetTopContainerOfXMLStream(stream), hostClass); + } + } catch (Exception ex) { + throw new Exception ("Error loading <" + CurrentGOMLPath + ">:", ex); } Interface.XmlLoaderCount --; -- cgit v1.3.1-4-g156e