Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Fix logging so that error details are output to console. #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

otac0n
Copy link

@otac0n otac0n commented May 13, 2018

This contains two changes:

  1. Unwrap the inner exception details of aggregate exceptions when logging.
  2. Fix a bug where the Program's Log was set to a CustomLog rather than the expected ConsoleLog.

@@ -83,7 +86,7 @@ public static int Main(string[] args)
catch (Exception ex)
{
exitCode = -2;
Log.WriteLine("An unexpected error occurred: {0}", ex.Message);
Log.WriteLine("An unexpected error occurred: {0}", ex.GetBaseException().Message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should catch aggregate exceptions specifically to do this. Just in case it's not an aggregate exception

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants