Skip to content

Commit 2b08451

Browse files
committed
formatting
1 parent b1f6fbb commit 2b08451

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

RazorEngineCore/RazorEngine.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ private MemoryStream CreateAndCompileToStream(string templateSource, RazorEngine
9595
{
9696
List<Diagnostic> errors = emitResult.Diagnostics.ToList();
9797

98-
RazorEngineCompilationException exception = new RazorEngineCompilationException($"Unable to compile template: {errors?.FirstOrDefault()}");
99-
exception.Errors = errors;
100-
exception.GeneratedCode = razorCSharpDocument.GeneratedCode;
98+
RazorEngineCompilationException exception = new RazorEngineCompilationException($"Unable to compile template: {errors.FirstOrDefault()}")
99+
{
100+
Errors = errors,
101+
GeneratedCode = razorCSharpDocument.GeneratedCode
102+
};
101103

102104
throw exception;
103105
}

0 commit comments

Comments
 (0)