Skip to content

Commit 21a446d

Browse files
committed
Write template code in case of catastrophic error.
1 parent 41bd69b commit 21a446d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/GraphODataTemplateWriter/TemplateProcessor/TemplateProcessor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ private Func<ITextTemplatingEngineHost, string> PreProcessTemplate(ITemplateInfo
292292

293293
if (realError)
294294
{
295+
File.WriteAllText("__ErrorFile.cs", generatedCode);
295296
throw new InvalidOperationException("Template error.");
296297
}
297298
}

0 commit comments

Comments
 (0)