-
Notifications
You must be signed in to change notification settings - Fork 177
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
Fix(Revit) : CNX-8387 ca1031 don't catch general exceptions #3106
Conversation
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 guess there's still a lot we need to figure out, and since your PR is the first... we're hitting a bunch of existential questions.
Only half way there but I'm taking a break for the day and didn't want to loose this. I'll do a review of the other half tomorrow
...ts/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertAdaptiveComponent.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertCeiling.cs
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertColumn.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertConnector.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertFaceWall.cs
Outdated
Show resolved
Hide resolved
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 we need to provide a bit more guidance @connorivy so I'll Leave it there :)
{ | ||
SpeckleLog.Logger.Warning(ex, "Error loading kit on startup"); | ||
NotifyUserOfErrorStartingConnector(ex); | ||
} | ||
catch (Exception ex) |
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.
just reference CNX-8644 here
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertBeam.cs
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertBlock.cs
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertCurves.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertCurves.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertDirectShape.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/ConverterRevit.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/DirectContext3DServer.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/RevitVersionHelper.cs
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/RevitVersionHelper.cs
Show resolved
Hide resolved
...erters/ConverterRevit/ConverterRevitTests/ConverterRevitTestsShared/SpeckleConversionTest.cs
Outdated
Show resolved
Hide resolved
@@ -46,6 +47,7 @@ internal static class SpeckleUtils | |||
{ | |||
tcs.TrySetException(exception); | |||
} | |||
#pragma warning restore CA1031 // Do not catch general exception types |
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.
Not sure about this one, possible we consider it a TL handler because of what it is? Not convinced though
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.
Assuming we ensure the task completion source is always observed. I think its safe to catch all here.
However, to be extra safe. In the few places of Core where we are using TaskCompletionSources, I'm using this pattern
we may consider doing something similar here.
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.
That being said.. I'm a bit puzzled why we're using a Task completion source here anyway. since we await the APIContext call anyway...
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.
Approving with some minor comments!
ConnectorRevit/ConnectorRevit/UI/ConnectorBindingsRevit.Events.cs
Outdated
Show resolved
Hide resolved
Objects/Converters/ConverterRevit/ConverterRevitShared/ConversionUtils.cs
Outdated
Show resolved
Hide resolved
...erters/ConverterRevit/ConverterRevitTests/ConverterRevitTestsShared/SpeckleConversionTest.cs
Outdated
Show resolved
Hide resolved
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.
All the last proposed changes look good. I'm merging this in.
Description & motivation
Changes:
To-do before merge:
Screenshots:
Validation of changes:
Checklist:
References