Skip to content

Commit

Permalink
2-liner-exception-messages-fix (#3535)
Browse files Browse the repository at this point in the history
* Update FeatureClassUtils.cs

* show CRS name

* exception message

---------

Co-authored-by: Oğuzhan Koral <[email protected]>
  • Loading branch information
KatKatKateryna and oguzhankoral authored Jul 1, 2024
1 parent 763037c commit b6141ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
),
};
}
}

0 comments on commit b6141ff

Please sign in to comment.