Skip to content

Commit

Permalink
Exception ignored are now logged
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasNilson committed May 31, 2020
1 parent d96ff4d commit 3647de6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Source/IdleMaster/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ static void Main()
String programName = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
key.SetValue(programName, (int)10001, RegistryValueKind.DWord);
}
catch (Exception)
catch (Exception ex)
{

Logger.Exception(ex, "Program -> Main -> Registry and environment modifications resulted in an exception.");
}

Application.ThreadException += (o, a) => Logger.Exception(a.Exception);
Expand Down
4 changes: 2 additions & 2 deletions Source/IdleMaster/frmBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ private void wbAuth_DocumentCompleted(object sender, WebBrowserDocumentCompleted
{
globalHeader.parentNode.removeChild(globalHeader);
}
catch (Exception)
catch (Exception ex)
{

Logger.Exception(ex, "frmBrowswer -> wbAuth_DocumentCompleted -> Removing the global_header resulted in an exception");
}

}
Expand Down
10 changes: 5 additions & 5 deletions Source/IdleMaster/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public void SortBadges(string method)
}
AllBadges = AllBadges.OrderByDescending(b => b.AveragePrice).ToList();
}
catch
catch (Exception ex)
{

Logger.Exception(ex, "frmMain -> SortBadges -> The method (mostvalue) resulted in an exception");
}
break;
default:
Expand Down Expand Up @@ -194,9 +194,9 @@ private void StartIdle()

}
}
catch (Exception)
catch (Exception ex)
{

Logger.Exception(ex, "frmMain -> StartIdle -> The attempt to kill rogue processes resulted in an exception.");
}

// Check if user is authenticated and if any badge left to idle
Expand Down Expand Up @@ -305,7 +305,7 @@ public void StopIdle()
}
catch (Exception ex)
{
Logger.Exception(ex, "frmMain -> StopIdle");
Logger.Exception(ex, "frmMain -> StopIdle -> An attempt to stop the idling processes resulted in an exception.");
}
}

Expand Down

0 comments on commit 3647de6

Please sign in to comment.