Skip to content

Commit

Permalink
refactor: Removed CouldNotGetSystemManager
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuca committed Feb 25, 2024
1 parent c2322df commit 3fe2a26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public static class ExceptionStrings
public const string TreeItemIsNotAPlcProject = "The provided tree item '{0}' is not a PLC project.";
public const string NotATwincatProject = "The provided project '{0}' is not a TwinCAT project.";
public const string CouldNotCreateTwincatDteInstance = $"Failed to create a DTE instance due to missing TwinCAT XAE or TwinCAT-intergrated Visual Studio installation. TwinCAT can be downloaded from: {TwincatConstants.TwincatXaeDownloadUrl}";
public const string CouldNotGetSystemManager = "Failed to get the system manager object from project {0}";
}
5 changes: 3 additions & 2 deletions src/TwinGet.TwincatInterface/TwincatProject.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is licensed to you under MIT license.

using System.Drawing;
using EnvDTE;
using TwinGet.TwincatInterface.Dto;
using TwinGet.TwincatInterface.Exceptions;
Expand Down Expand Up @@ -34,8 +35,8 @@ public TwincatProject(EnvDTE.Project project)

if (_systemManager is null)
{
throw new CouldNotGetSystemManager(
$"Failed to get the system manager object from project {_project.Name}"
throw new TwincatInterfaceException(
string.Format(ExceptionStrings.CouldNotGetSystemManager, _project.Name)
);
}

Expand Down

0 comments on commit 3fe2a26

Please sign in to comment.