diff --git a/Converters/Autocad/Speckle.Converters.AutocadShared/AutocadRootToHostConverter.cs b/Converters/Autocad/Speckle.Converters.AutocadShared/AutocadRootToHostConverter.cs index a3665a16a..8edea41f3 100644 --- a/Converters/Autocad/Speckle.Converters.AutocadShared/AutocadRootToHostConverter.cs +++ b/Converters/Autocad/Speckle.Converters.AutocadShared/AutocadRootToHostConverter.cs @@ -2,6 +2,7 @@ using Speckle.Converters.Common; using Speckle.Converters.Common.Objects; using Speckle.Converters.Common.Registration; +using Speckle.Sdk.Common; using Speckle.Sdk.Models; namespace Speckle.Converters.Autocad; @@ -24,7 +25,7 @@ public Base Convert(object target) { if (target is not DBObject dbObject) { - throw new NotSupportedException( + throw new ConversionNotSupportedException( $"Conversion of {target.GetType().Name} to Speckle is not supported. Only objects that inherit from DBObject are." ); } @@ -41,7 +42,7 @@ public Base Convert(object target) if (objectConverter == null) { - throw new NotSupportedException($"No conversion found for {target.GetType().Name}"); + throw new ConversionNotSupportedException($"No conversion found for {target.GetType().Name}"); } var convertedObject = objectConverter.Convert(dbObject); diff --git a/Converters/Civil3d/Speckle.Converters.Civil3dShared/Civil3dRootToHostConverter.cs b/Converters/Civil3d/Speckle.Converters.Civil3dShared/Civil3dRootToHostConverter.cs index d79791123..e9dbd3379 100644 --- a/Converters/Civil3d/Speckle.Converters.Civil3dShared/Civil3dRootToHostConverter.cs +++ b/Converters/Civil3d/Speckle.Converters.Civil3dShared/Civil3dRootToHostConverter.cs @@ -2,6 +2,7 @@ using Speckle.Converters.Common; using Speckle.Converters.Common.Objects; using Speckle.Converters.Common.Registration; +using Speckle.Sdk.Common; using Speckle.Sdk.Models; namespace Speckle.Converters.Civil3d; @@ -24,7 +25,7 @@ public Base Convert(object target) { if (target is not DBObject dbObject) { - throw new NotSupportedException( + throw new ConversionNotSupportedException( $"Conversion of {target.GetType().Name} to Speckle is not supported. Only objects that inherit from DBObject are." ); } @@ -41,7 +42,7 @@ public Base Convert(object target) if (objectConverter == null) { - throw new NotSupportedException($"No conversion found for {target.GetType().Name}"); + throw new ConversionNotSupportedException($"No conversion found for {target.GetType().Name}"); } var convertedObject = objectConverter.Convert(dbObject);