From: jpbruyere Date: Mon, 1 Aug 2016 22:04:28 +0000 (+0200) Subject: Show xml file path for exceptions during loading. X-Git-Tag: v0.4~21^2~1 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=64cd2506f789813ddea2159c1ac658f16e09f4bb;p=jp%2Fcrow.git Show xml file path for exceptions during loading. modifié : 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 --;