Skip to content

Commit 7a44be4

Browse files
committed
Update CompiledExceptionToken.cs
1 parent 84ebd48 commit 7a44be4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Serilog.Expressions/Templates/Compilation/CompiledExceptionToken.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public override void Evaluate(EvaluationContext ctx, TextWriter output)
4141
{
4242
lines = new StringReader(ctx.LogEvent.Exception.ToString());
4343
}
44-
catch (Exception e)
44+
catch (Exception ex)
4545
{
4646
lines = new StringReader(
47-
$"[Exception.ToString() failed: {e.Message}] Original exception type: {ctx.LogEvent.Exception?.GetType().FullName}, message: {ctx.LogEvent.Exception?.Message}{Environment.NewLine}");
47+
$"[Exception.ToString() failed: {ex.Message}] Original exception type: {ctx.LogEvent.Exception.GetType().FullName}{Environment.NewLine}");
4848
}
4949

5050
while (lines.ReadLine() is { } nextLine)

0 commit comments

Comments
 (0)