]> O.S.I.I.S - jp/crow.git/commitdiff
Show xml file path for exceptions during loading.
authorjpbruyere <jp.bruyere@hotmail.com>
Mon, 1 Aug 2016 22:04:28 +0000 (00:04 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Mon, 1 Aug 2016 22:04:28 +0000 (00:04 +0200)
modifié :         src/Interface.cs

src/Interface.cs

index 07797a1048b2be56b139feb57f929c8ad6c24478..607044d9c6e471a264ec25d5b467efb113ba0ddf 100644 (file)
@@ -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 --;