Skip to content

Commit 0bf1672

Browse files
committed
More informative exceptions from Logger
1 parent cbb3d1b commit 0bf1672

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitVersionCore/Logger.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static Action<string> LogMessage(Action<string> logAction, string level)
5959

6060
public static void Reset()
6161
{
62-
WriteInfo = s => { throw new Exception("Logger not defined."); };
63-
WriteWarning = s => { throw new Exception("Logger not defined."); };
64-
WriteError = s => { throw new Exception("Logger not defined."); };
62+
WriteInfo = s => { throw new Exception("Info logger not defined. Attempted to log: " + s); };
63+
WriteWarning = s => { throw new Exception("Warning logger not defined. Attempted to log: " + s); };
64+
WriteError = s => { throw new Exception("Error logger not defined. Attempted to log: " + s); };
6565
}
6666

6767
class ActionDisposable : IDisposable

0 commit comments

Comments
 (0)