Skip to content

Commit

Permalink
Merge pull request #44 from FastReports/detrav_branch
Browse files Browse the repository at this point in the history
- fix #41
  • Loading branch information
Detrav authored Nov 27, 2018
2 parents 90654c8 + 6bd100a commit d5509fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
16 changes: 10 additions & 6 deletions FastReport.OpenSource/DotNetClasses/CSharpCodeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@ public override CompilerResults CompileAssemblyFromSource(CompilerParameters cp,
CompilerResults result = new CompilerResults();
foreach (Diagnostic d in results.Diagnostics)
{
result.Errors.Add(new CompilerError()
if (d.Severity == DiagnosticSeverity.Error)
{
ErrorText = d.GetMessage(),
ErrorNumber = d.Id,
Line = d.Location.GetLineSpan().StartLinePosition.Line,
Column = d.Location.GetLineSpan().StartLinePosition.Character
});
result.Errors.Add(new CompilerError()
{
ErrorText = d.GetMessage(),
ErrorNumber = d.Id,
Line = d.Location.GetLineSpan().StartLinePosition.Line,
Column = d.Location.GetLineSpan().StartLinePosition.Character,

});
}
}
return result;
}
Expand Down
15 changes: 9 additions & 6 deletions FastReport.OpenSource/DotNetClasses/VBCodeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ public override CompilerResults CompileAssemblyFromSource(CompilerParameters cp,
CompilerResults result = new CompilerResults();
foreach (Diagnostic d in results.Diagnostics)
{
result.Errors.Add(new CompilerError()
if (d.Severity == DiagnosticSeverity.Error)
{
ErrorText = d.GetMessage(),
ErrorNumber = d.Id,
Line = d.Location.GetLineSpan().StartLinePosition.Line,
Column = d.Location.GetLineSpan().StartLinePosition.Character
});
result.Errors.Add(new CompilerError()
{
ErrorText = d.GetMessage(),
ErrorNumber = d.Id,
Line = d.Location.GetLineSpan().StartLinePosition.Line,
Column = d.Location.GetLineSpan().StartLinePosition.Character
});
}
}
return result;
}
Expand Down

0 comments on commit d5509fa

Please sign in to comment.