Skip to content

Commit

Permalink
Removed repeated comment lines that didn't add much value
Browse files Browse the repository at this point in the history
The code itself is pretty clear, so the additional comments are adding more noise than value.
  • Loading branch information
Sam Storie authored and TravisTheTechie committed Aug 19, 2016
1 parent 763e3c4 commit a4b38b5
Showing 3 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions src/Topshelf/Hosts/ConsoleRunHost.cs
Original file line number Diff line number Diff line change
@@ -102,8 +102,6 @@ public TopshelfExitCode Run()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Error("An exception occurred", ex);
@@ -148,8 +146,6 @@ void HostControl.Restart()

void CatchUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke((Exception)e.ExceptionObject);

_log.Fatal("The service threw an unhandled exception", (Exception)e.ExceptionObject);
@@ -193,8 +189,6 @@ void StopService()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Error("The service did not shut down gracefully", ex);
2 changes: 0 additions & 2 deletions src/Topshelf/Hosts/TestHost.cs
Original file line number Diff line number Diff line change
@@ -61,8 +61,6 @@ public TopshelfExitCode Run()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Error("The service threw an exception during testing.", ex);
16 changes: 0 additions & 16 deletions src/Topshelf/Runtime/Windows/WindowsServiceHost.cs
Original file line number Diff line number Diff line change
@@ -130,8 +130,6 @@ protected override void OnStart(string[] args)
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Fatal("The service did not start successfully", ex);
@@ -154,8 +152,6 @@ protected override void OnStop()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Fatal("The service did not shut down gracefully", ex);
@@ -184,8 +180,6 @@ protected override void OnPause()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Fatal("The service did not pause gracefully", ex);
@@ -206,8 +200,6 @@ protected override void OnContinue()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Fatal("The service did not resume successfully", ex);
@@ -227,8 +219,6 @@ protected override void OnShutdown()
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Fatal("The service did not shut down gracefully", ex);
@@ -251,8 +241,6 @@ protected override void OnSessionChange(SessionChangeDescription changeDescripti
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Fatal("The service did not shut down gracefully", ex);
@@ -273,8 +261,6 @@ protected override void OnCustomCommand(int command)
}
catch (Exception ex)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke(ex);

_log.Error("Unhandled exception during custom command processing detected", ex);
@@ -296,8 +282,6 @@ protected override void Dispose(bool disposing)

void CatchUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
// Call the custom exception handler if it is not null
//
_settings.ExceptionCallback?.Invoke((Exception)e.ExceptionObject);

_log.Fatal("The service threw an unhandled exception", (Exception)e.ExceptionObject);

0 comments on commit a4b38b5

Please sign in to comment.