Skip to content
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

ArcGIS GeodatabaseTableException #264

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using ArcGIS.Desktop.Mapping;
using Speckle.Converters.Common;
using Speckle.InterfaceGenerator;
using Speckle.Sdk;

Check failure on line 7 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

Check failure on line 7 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

Check failure on line 7 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

Check failure on line 7 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.GraphTraversal;
using FieldDescription = ArcGIS.Core.Data.DDL.FieldDescription;
Expand Down Expand Up @@ -44,7 +44,7 @@
schemaBuilder.Build();
MapView.Active.Redraw(true);
}
catch (Exception ex) when (!ex.IsFatal()) //(GeodatabaseTableException)
catch (GeodatabaseTableException ex)

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used

Check failure on line 47 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)
{
// "The table was not found." | System.InvalidCast
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be handling System.InvalidCastException?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks legit with your changes already, we don't seems to cast anything here, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look to be. But there was this comment so I thought I'd ask.

Perhaps GetDefinition<FeatureClassDefinition> may throw if there is something in the db with the name, but it isn't a FeatureClassDefinition

Not sure if that's even a possibility.

// delete Table if already exists
Expand All @@ -56,7 +56,7 @@
schemaBuilder.Build();
MapView.Active.Redraw(true);
}
catch (Exception ex2) when (!ex2.IsFatal()) //(GeodatabaseTableException)
catch (GeodatabaseTableException ex2) //(GeodatabaseTableException)

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex2' is declared but never used

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex2' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex2' is declared but never used

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex2' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex2' is declared but never used

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex2' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex2' is declared but never used

Check failure on line 59 in Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/FeatureClassUtils.cs

View workflow job for this annotation

GitHub Actions / build

Unnecessary assignment of a value to 'ex2' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0059)
{
// "The table was not found.", do nothing
}
Expand Down