Skip to content

Commit 07eea7b

Browse files
author
William D Cossey
committed
A more descriptive error message.
1 parent 3a8ad7f commit 07eea7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RazorEngineCore/RazorEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private MemoryStream CreateAndCompileToStream(string templateSource, RazorEngine
110110
{
111111
List<Diagnostic> errors = emitResult.Diagnostics.ToList();
112112

113-
RazorEngineCompilationException exception = new RazorEngineCompilationException($"Unable to compile template: {errors.FirstOrDefault()}")
113+
RazorEngineCompilationException exception = new RazorEngineCompilationException($"Unable to compile template: \n{string.Join("\n", errors)}")
114114
{
115115
Errors = errors,
116116
GeneratedCode = razorCSharpDocument.GeneratedCode

0 commit comments

Comments
 (0)