/// <summary> /// Throws DiffToolIntegrationException if integration failed /// </summary> private void registerInTool(IIntegratedDiffTool diffTool, string self) { try { diffTool.PatchToolConfig(self + " diff"); } catch (DiffToolIntegrationException) { throw; } catch (Exception ex) // whatever XML exception { throw new DiffToolIntegrationException("Unknown error", ex); } }
/// <summary> /// Throws DiffToolIntegrationException if integration failed /// </summary> private void registerInTool(IIntegratedDiffTool diffTool) { if (!isInstalled(diffTool)) { throw new DiffToolIntegrationException("Diff tool not installed", null); } try { diffTool.PatchToolConfig(Process.GetCurrentProcess().MainModule.FileName + " diff"); } catch (DiffToolIntegrationException) { throw; } catch (Exception ex) // whatever XML exception { throw new DiffToolIntegrationException("Unknown error", ex); } }