-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor usage of exceptions in converters/connectors #286
Conversation
3ef63d6
to
d5d6a82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I follow everything...just making sure about some comments
Converters/Civil3d/Speckle.Converters.Civil3dShared/Civil3dRootToHostConverter.cs
Outdated
Show resolved
Hide resolved
Converters/Revit/Speckle.Converters.RevitShared/Helpers/ParameterValueSetter.cs
Show resolved
Hide resolved
Converters/Revit/Speckle.Converters.RevitShared/RevitRootToHostConverter.cs
Show resolved
Hide resolved
Tested in ArcGIS:
|
@@ -311,7 +313,7 @@ List<ObjectConversionTracker> listOfTrackers | |||
{ | |||
if (trackerItem.HostAppGeom is not ACG.Geometry shape) | |||
{ | |||
throw new SpeckleConversionException("Feature Class element had no converted geometry"); | |||
throw new ValidationException("Feature Class element had no converted geometry"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly we can replace some of the ArgumentExceptions in other converters to ValidationException too
be82244
to
abeaa5e
Compare
These are the existing exceptions right now:
Connectors now use exclusively
SpeckleException
instead of a mix of that and conversionexceptions.The only place where
ConversionNotSupported
is expected is within aRootObjectConverter
.ValidationException
is thrown if we can verify the data is wrong BEFORE we can attempt conversionConversionException
should be used for anything else.We can expand the types more as we find more use-cases to unify.