You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
♻️ (MigrationTools): refactor exception handling and update XML references
Update the XML documentation to reflect the latest commit and tag
information, ensuring that the documentation remains accurate and
up-to-date. This change is necessary to maintain consistency with the
current state of the codebase.
Refactor exception handling in `TfsNodeStructureTool.cs` by introducing
an extension method `AsMigrationToolsException`. This improves code
readability and reduces redundancy by centralizing the conversion of
exceptions to `MigrationToolsException`. The refactoring also removes
unused imports and redundant code, streamlining the codebase for better
maintainability.
Exceptionex=newException(string.Format("Unable to load Common Structure for Source. This is usually due to different language versions. Validate that '{0}' is the correct name in your version. ",treeTypeSource));
466
452
Log.LogError(ex,"Unable to load Common Structure for Source.");
Exceptionex2=newException(string.Format("Unable to load Common Structure for Target.This is usually due to TFS having a different installed langauge version than was expected.. Validate that '{0}' is the correct name in your version. This would be something like 'Fläche' or 'Aire'. If you open the area tree in Visual Studio, or web access, you should see the name your langauage uses for 'Area' or 'Iteration. Do not try to add a specific area or iteration path to this field. Check the defaults on https://nkdagility.com/learn/azure-devops-migration-tools/Reference/Endpoints/TfsTeamProjectEndpoint/ for an example fro English.",localizedTreeTypeName),ex);
478
-
Log.LogError(ex2,"Unable to load Common Structure for Target.");
@@ -751,7 +735,7 @@ public string FixAreaPathAndIterationPathForTargetQuery(string sourceWIQLQuery,
751
735
structureType=TfsNodeStructureType.Iteration;
752
736
break;
753
737
default:
754
-
thrownewInvalidOperationException($"Field type {fieldType} is not supported for query remapping.");
738
+
thrownewInvalidOperationException($"Field type {fieldType} is not supported for query remapping.").AsMigrationToolsException(MigrationToolsException.ExceptionSource.Internal);
0 commit comments