Skip to content

Commit

Permalink
Handling missing filePath for error message formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
mawtex committed May 24, 2017
1 parent d737b59 commit d0bb15e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Composite/Core/Xml/XhtmlErrorFormatter.cs
Expand Up @@ -148,10 +148,13 @@ private static XElement GetSourceCodeInfo(Exception ex)

if (firstCompileError != null)
{
string filePath = (string) GetPropertyValue(firstCompileError, "FileName");
int line = (int) GetPropertyValue(firstCompileError, "Line");
string filePath = (string)GetPropertyValue(firstCompileError, "FileName");
int line = (int)GetPropertyValue(firstCompileError, "Line");

return SourceCodePreview(filePath, line);
if (!string.IsNullOrEmpty(filePath))
{
return SourceCodePreview(filePath, line);
}
}
}

Expand Down

0 comments on commit d0bb15e

Please sign in to comment.