Index: Core/Common/src/Core.Common.Utils/Properties/Resources.Designer.cs =================================================================== diff -u -r997937ce7659313e714efcd5fe47101c6b53d984 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Common/src/Core.Common.Utils/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 997937ce7659313e714efcd5fe47101c6b53d984) +++ Core/Common/src/Core.Common.Utils/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -22,7 +22,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.17929 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -118,7 +118,7 @@ } /// - /// Looks up a localized string similar to Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.. + /// Looks up a localized string similar to Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.. /// public static string Error_General_IO_Import_ErrorMessage { get { Index: Core/Common/src/Core.Common.Utils/Properties/Resources.resx =================================================================== diff -u -r997937ce7659313e714efcd5fe47101c6b53d984 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Common/src/Core.Common.Utils/Properties/Resources.resx (.../Resources.resx) (revision 997937ce7659313e714efcd5fe47101c6b53d984) +++ Core/Common/src/Core.Common.Utils/Properties/Resources.resx (.../Resources.resx) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -148,7 +148,7 @@ Regel bevat te veel tekst om in het RAM geheugen opgeslagen te worden. - Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie. + Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie. op regel {0} Index: Core/Components/src/Core.Components.Gis.IO/Properties/Resources.Designer.cs =================================================================== diff -u -r77cf65094a6821862174776c788f133b6ffee1ba -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/src/Core.Components.Gis.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 77cf65094a6821862174776c788f133b6ffee1ba) +++ Core/Components/src/Core.Components.Gis.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -82,25 +82,16 @@ } /// - /// Looks up a localized string similar to Het bestand bevat geen lijn geometrieën.. + /// Looks up a localized string similar to Kon geen punten vinden in dit bestand.. /// - internal static string LineShapeFileReader_File_contains_geometries_not_line { - get { - return ResourceManager.GetString("LineShapeFileReader_File_contains_geometries_not_line", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bestand bevat geen enkele punt.. - /// internal static string PointShapeFileReader_File_contains_geometries_not_points { get { return ResourceManager.GetString("PointShapeFileReader_File_contains_geometries_not_points", resourceCulture); } } /// - /// Looks up a localized string similar to Bestand bevat geen enkele polygoon.. + /// Looks up a localized string similar to Kon geen polygonen vinden in dit bestand.. /// internal static string PointShapeFileReader_File_contains_geometries_not_polygons { get { @@ -137,6 +128,15 @@ } /// + /// Looks up a localized string similar to Kon geen lijnen vinden in dit bestand.. + /// + internal static string PolylineShapeFileReader_File_contains_geometries_not_line { + get { + return ResourceManager.GetString("PolylineShapeFileReader_File_contains_geometries_not_line", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Lijn. /// internal static string PolylineShapeFileReader_ReadLine_Line { Index: Core/Components/src/Core.Components.Gis.IO/Properties/Resources.resx =================================================================== diff -u -r77cf65094a6821862174776c788f133b6ffee1ba -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/src/Core.Components.Gis.IO/Properties/Resources.resx (.../Resources.resx) (revision 77cf65094a6821862174776c788f133b6ffee1ba) +++ Core/Components/src/Core.Components.Gis.IO/Properties/Resources.resx (.../Resources.resx) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -117,20 +117,20 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Het bestand bevat geen lijn geometrieën. + + Kon geen lijnen vinden in dit bestand. Lijn - Bestand bevat geen enkele punt. + Kon geen punten vinden in dit bestand. Punten - Bestand bevat geen enkele polygoon. + Kon geen polygonen vinden in dit bestand. Polygoon Index: Core/Components/src/Core.Components.Gis.IO/Readers/PointShapeFileReader.cs =================================================================== diff -u -r718348fd1a88ab775f495dad750379e4cbedb25f -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/src/Core.Components.Gis.IO/Readers/PointShapeFileReader.cs (.../PointShapeFileReader.cs) (revision 718348fd1a88ab775f495dad750379e4cbedb25f) +++ Core/Components/src/Core.Components.Gis.IO/Readers/PointShapeFileReader.cs (.../PointShapeFileReader.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -67,6 +67,12 @@ .Build(GisIOResources.PointShapeFileReader_File_contains_geometries_not_points); throw new CriticalFileReadException(message, e); } + catch (ArgumentException e) + { + string message = new FileReaderErrorMessageBuilder(filePath) + .Build(GisIOResources.PointShapeFileReader_File_contains_geometries_not_points); + throw new CriticalFileReadException(message, e); + } catch (IOException exception) { var message = new FileReaderErrorMessageBuilder(filePath).Build(CoreCommonUtilsResources.Error_General_IO_Import_ErrorMessage); Index: Core/Components/src/Core.Components.Gis.IO/Readers/PolylineShapeFileReader.cs =================================================================== diff -u -r718348fd1a88ab775f495dad750379e4cbedb25f -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/src/Core.Components.Gis.IO/Readers/PolylineShapeFileReader.cs (.../PolylineShapeFileReader.cs) (revision 718348fd1a88ab775f495dad750379e4cbedb25f) +++ Core/Components/src/Core.Components.Gis.IO/Readers/PolylineShapeFileReader.cs (.../PolylineShapeFileReader.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -64,7 +64,7 @@ catch (ArgumentException exception) { string message = new FileReaderErrorMessageBuilder(shapeFilePath) - .Build(GisIOResources.LineShapeFileReader_File_contains_geometries_not_line); + .Build(GisIOResources.PolylineShapeFileReader_File_contains_geometries_not_line); throw new CriticalFileReadException(message, exception); } catch (IOException exception) Index: Core/Components/test/Core.Components.Gis.IO.Test/Readers/PointShapeFileReaderTest.cs =================================================================== diff -u -r997937ce7659313e714efcd5fe47101c6b53d984 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/test/Core.Components.Gis.IO.Test/Readers/PointShapeFileReaderTest.cs (.../PointShapeFileReaderTest.cs) (revision 997937ce7659313e714efcd5fe47101c6b53d984) +++ Core/Components/test/Core.Components.Gis.IO.Test/Readers/PointShapeFileReaderTest.cs (.../PointShapeFileReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -67,7 +67,7 @@ TestDelegate call = () => new PointShapeFileReader(nonPointShapeFile); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Bestand bevat geen enkele punt.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Kon geen punten vinden in dit bestand.", nonPointShapeFile); var message = Assert.Throws(call).Message; Assert.AreEqual(expectedMessage, message); @@ -85,7 +85,7 @@ TestDelegate call = () => new PointShapeFileReader(testFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.", testFilePath); CriticalFileReadException exception = Assert.Throws(call); Assert.AreEqual(expectedMessage, exception.Message); Index: Core/Components/test/Core.Components.Gis.IO.Test/Readers/PolygonShapeFileReaderTest.cs =================================================================== diff -u -r997937ce7659313e714efcd5fe47101c6b53d984 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/test/Core.Components.Gis.IO.Test/Readers/PolygonShapeFileReaderTest.cs (.../PolygonShapeFileReaderTest.cs) (revision 997937ce7659313e714efcd5fe47101c6b53d984) +++ Core/Components/test/Core.Components.Gis.IO.Test/Readers/PolygonShapeFileReaderTest.cs (.../PolygonShapeFileReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -72,7 +72,7 @@ TestDelegate call = () => new PolygonShapeFileReader(nonPolygonShapeFile); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Bestand bevat geen enkele polygoon.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Kon geen polygonen vinden in dit bestand.", nonPolygonShapeFile); var message = Assert.Throws(call).Message; Assert.AreEqual(expectedMessage, message); @@ -90,7 +90,7 @@ TestDelegate call = () => new PolygonShapeFileReader(testFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.", testFilePath); CriticalFileReadException exception = Assert.Throws(call); Assert.AreEqual(expectedMessage, exception.Message); Index: Core/Components/test/Core.Components.Gis.IO.Test/Readers/PolylineShapeFileReaderTest.cs =================================================================== diff -u -r77cf65094a6821862174776c788f133b6ffee1ba -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Components/test/Core.Components.Gis.IO.Test/Readers/PolylineShapeFileReaderTest.cs (.../PolylineShapeFileReaderTest.cs) (revision 77cf65094a6821862174776c788f133b6ffee1ba) +++ Core/Components/test/Core.Components.Gis.IO.Test/Readers/PolylineShapeFileReaderTest.cs (.../PolylineShapeFileReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -66,7 +66,7 @@ TestDelegate call = () => new PolylineShapeFileReader(nonLineShapeFile); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand bevat geen lijn geometrieën.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Kon geen lijnen vinden in dit bestand.", nonLineShapeFile); var message = Assert.Throws(call).Message; Assert.AreEqual(expectedMessage, message); @@ -84,7 +84,7 @@ TestDelegate call = () => new PolylineShapeFileReader(testFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.", testFilePath); CriticalFileReadException exception = Assert.Throws(call); Assert.AreEqual(expectedMessage, exception.Message); Index: Core/Plugins/src/Core.Plugins.Map/Legend/MapLegendView.cs =================================================================== diff -u -rf0275727312791f8b218cb7db12404ec8a8863c8 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Plugins/src/Core.Plugins.Map/Legend/MapLegendView.cs (.../MapLegendView.cs) (revision f0275727312791f8b218cb7db12404ec8a8863c8) +++ Core/Plugins/src/Core.Plugins.Map/Legend/MapLegendView.cs (.../MapLegendView.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -239,16 +239,28 @@ log.Info(MapResources.MapLegendView_CheckDataFormat_Shapefile_Is_Imported); mapDataCollection.NotifyObservers(); } + catch (ArgumentException) + { + string message = new FileReaderErrorMessageBuilder(filePath) + .Build(MapResources.MapLegendView_CheckDataFormat_File_does_not_contain_geometries); + log.Error(message); + } catch (FileNotFoundException) { string message = new FileReaderErrorMessageBuilder(filePath) - .Build(MapResources.MapLegendView_CheckDataFormat_File_Does_Not_Exist_Or_Misses_Needed_Files); + .Build(MapResources.MapLegendView_CheckDataFormat_File_does_not_exist_or_misses_needed_files); log.Error(message); } + catch (NullReferenceException) + { + string message = new FileReaderErrorMessageBuilder(filePath) + .Build(MapResources.MapLegendView_CheckDataFormat_An_error_occured_when_trying_to_read_the_file); + log.Error(message); + } catch (IOException) { string message = new FileReaderErrorMessageBuilder(filePath) - .Build(MapResources.MapLegendView_CheckDataFormat_An_Error_Occured_When_Trying_To_Read_The_File); + .Build(MapResources.MapLegendView_CheckDataFormat_An_error_occured_when_trying_to_read_the_file); log.Error(message); } catch (CriticalFileReadException e) Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs =================================================================== diff -u -rf45ee8cd668d63bb8bc52c7cbeb1b68a44daaaf6 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f45ee8cd668d63bb8bc52c7cbeb1b68a44daaaf6) +++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -121,20 +121,29 @@ } /// - /// Looks up a localized string similar to Het bestand is niet toegankelijk.. + /// Looks up a localized string similar to Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.. /// - public static string MapLegendView_CheckDataFormat_An_Error_Occured_When_Trying_To_Read_The_File { + public static string MapLegendView_CheckDataFormat_An_error_occured_when_trying_to_read_the_file { get { - return ResourceManager.GetString("MapLegendView_CheckDataFormat_An_Error_Occured_When_Trying_To_Read_The_File", resourceCulture); + return ResourceManager.GetString("MapLegendView_CheckDataFormat_An_error_occured_when_trying_to_read_the_file", resourceCulture); } } /// + /// Looks up a localized string similar to Kon geen geometrieën vinden in dit bestand.. + /// + public static string MapLegendView_CheckDataFormat_File_does_not_contain_geometries { + get { + return ResourceManager.GetString("MapLegendView_CheckDataFormat_File_does_not_contain_geometries", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Het bestand of andere benodigde bestanden zijn niet gevonden.. /// - public static string MapLegendView_CheckDataFormat_File_Does_Not_Exist_Or_Misses_Needed_Files { + public static string MapLegendView_CheckDataFormat_File_does_not_exist_or_misses_needed_files { get { - return ResourceManager.GetString("MapLegendView_CheckDataFormat_File_Does_Not_Exist_Or_Misses_Needed_Files", resourceCulture); + return ResourceManager.GetString("MapLegendView_CheckDataFormat_File_does_not_exist_or_misses_needed_files", resourceCulture); } } Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx =================================================================== diff -u -rf45ee8cd668d63bb8bc52c7cbeb1b68a44daaaf6 -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision f45ee8cd668d63bb8bc52c7cbeb1b68a44daaaf6) +++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -202,10 +202,13 @@ Het shapebestand is geïmporteerd. - + Het bestand of andere benodigde bestanden zijn niet gevonden. - - Het bestand is niet toegankelijk. + + Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie. + + Kon geen geometrieën vinden in dit bestand. + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/DikeProfiles/ProfileLocationReaderTest.cs =================================================================== diff -u -r24e6bba4341f818f1dd3dfd168aff1c41070979a -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/DikeProfiles/ProfileLocationReaderTest.cs (.../ProfileLocationReaderTest.cs) (revision 24e6bba4341f818f1dd3dfd168aff1c41070979a) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/DikeProfiles/ProfileLocationReaderTest.cs (.../ProfileLocationReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -172,7 +172,7 @@ TestDelegate call = () => new ProfileLocationReader(validFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.", validFilePath); var exception = Assert.Throws(call); Assert.AreEqual(expectedMessage, exception.Message); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/FailureMechanismSectionReaderTest.cs =================================================================== diff -u -r77cf65094a6821862174776c788f133b6ffee1ba -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/FailureMechanismSectionReaderTest.cs (.../FailureMechanismSectionReaderTest.cs) (revision 77cf65094a6821862174776c788f133b6ffee1ba) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/FailureMechanismSectionReaderTest.cs (.../FailureMechanismSectionReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -131,7 +131,7 @@ TestDelegate call = () => new FailureMechanismSectionReader(invalidFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand bevat geen lijn geometrieën.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Kon geen lijnen vinden in dit bestand.", invalidFilePath); var message = Assert.Throws(call).Message; Assert.AreEqual(expectedMessage, message); @@ -321,7 +321,7 @@ TestDelegate call = () => new FailureMechanismSectionReader(validFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.", validFilePath); var exception = Assert.Throws(call); Assert.AreEqual(expectedMessage, exception.Message); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineReaderTest.cs =================================================================== diff -u -r77cf65094a6821862174776c788f133b6ffee1ba -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineReaderTest.cs (.../ReferenceLineReaderTest.cs) (revision 77cf65094a6821862174776c788f133b6ffee1ba) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineReaderTest.cs (.../ReferenceLineReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -147,7 +147,7 @@ TestDelegate call = () => reader.ReadReferenceLine(invalidFilePath); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand bevat geen lijn geometrieën.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Kon geen lijnen vinden in dit bestand.", invalidFilePath); var message = Assert.Throws(call).Message; Assert.AreEqual(expectedMessage, message); @@ -207,7 +207,7 @@ TestDelegate call = () => reader.ReadReferenceLine(validReferenceLineShapeFile); // Assert - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand in gebruik door een andere applicatie.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand kon niet worden geopend. Mogelijk is het bestand corrupt of in gebruik door een andere applicatie.", validReferenceLineShapeFile); var exception = Assert.Throws(call); Assert.AreEqual(expectedMessage, exception.Message); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLinesMetaReaderTest.cs =================================================================== diff -u -r77cf65094a6821862174776c788f133b6ffee1ba -rcff3301f201c4e1d4691334cd3af48698f1b0d41 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLinesMetaReaderTest.cs (.../ReferenceLinesMetaReaderTest.cs) (revision 77cf65094a6821862174776c788f133b6ffee1ba) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLinesMetaReaderTest.cs (.../ReferenceLinesMetaReaderTest.cs) (revision cff3301f201c4e1d4691334cd3af48698f1b0d41) @@ -114,7 +114,7 @@ TestDelegate call = () => ReferenceLinesMetaReader.ReadReferenceLinesMetas(invalidFilePath); // Assert . - var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand bevat geen lijn geometrieën.", + var expectedMessage = string.Format("Fout bij het lezen van bestand '{0}': Kon geen lijnen vinden in dit bestand.", invalidFilePath); var message = Assert.Throws(call).Message; Assert.AreEqual(expectedMessage, message);