From b6141ff584832b4a82c7acc9e5263d914454c57a Mon Sep 17 00:00:00 2001 From: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:32:35 +0800 Subject: [PATCH] 2-liner-exception-messages-fix (#3535) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update FeatureClassUtils.cs * show CRS name * exception message --------- Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com> --- .../Geometry/PointToSpeckleConverter.cs | 2 +- .../Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Geometry/PointToSpeckleConverter.cs b/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Geometry/PointToSpeckleConverter.cs index 198af4e5ee..9b0859318b 100644 --- a/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Geometry/PointToSpeckleConverter.cs +++ b/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Geometry/PointToSpeckleConverter.cs @@ -23,7 +23,7 @@ is not MapPoint reprojectedPt ) { throw new SpeckleConversionException( - $"Conversion to Spatial Reference {_contextStack.Current.Document.Map.SpatialReference} failed" + $"Conversion to Spatial Reference {_contextStack.Current.Document.Map.SpatialReference.Name} failed" ); } return new(reprojectedPt.X, reprojectedPt.Y, reprojectedPt.Z, _contextStack.Current.SpeckleUnits); diff --git a/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs b/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs index c80b8473f1..6e3a587b45 100644 --- a/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs +++ b/DUI3-DX/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs @@ -122,7 +122,11 @@ public ACG.GeometryType GetLayerGeometryType(VectorLayer target) GISLayerGeometryType.POLYLINE => ACG.GeometryType.Polyline, GISLayerGeometryType.MULTIPATCH => ACG.GeometryType.Multipatch, GISLayerGeometryType.POLYGON3D => ACG.GeometryType.Multipatch, - _ => throw new ArgumentOutOfRangeException(nameof(target)), + _ + => throw new ArgumentOutOfRangeException( + nameof(target), + $"Geometry type '{originalGeomType}' is not recognized." + ), }; } }