include file name in error report
This commit is contained in:
parent
cd28a49647
commit
7bb5a97696
1 changed files with 11 additions and 2 deletions
|
|
@ -246,7 +246,7 @@ namespace Observatory
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
readErrors.Add((ex, "Pre-read", line));
|
||||
readErrors.Add((ex, file, line));
|
||||
}
|
||||
}
|
||||
return readErrors;
|
||||
|
|
@ -278,8 +278,17 @@ namespace Observatory
|
|||
var errorContent = new System.Text.StringBuilder();
|
||||
int count = 0;
|
||||
foreach (var error in readErrors)
|
||||
{
|
||||
|
||||
if (error.ex.InnerException == null)
|
||||
{
|
||||
errorContent.AppendLine(error.ex.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
errorContent.AppendLine(error.ex.InnerException.Message);
|
||||
}
|
||||
|
||||
errorContent.AppendLine($"File: {error.file}");
|
||||
if (error.line.Length > 200)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue