Set RazorError code to null

This commit is contained in:
Pranav K 2015-09-11 12:08:23 -07:00
parent bc10a17107
commit 345021d822
1 changed files with 9 additions and 10 deletions

View File

@ -20,7 +20,6 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
/// </summary> /// </summary>
public class RazorCompilationService : IRazorCompilationService public class RazorCompilationService : IRazorCompilationService
{ {
private const string RazorErrorCode = "RZ1001";
private readonly ICompilationService _compilationService; private readonly ICompilationService _compilationService;
private readonly IMvcRazorHost _razorHost; private readonly IMvcRazorHost _razorHost;
private readonly IFileProvider _fileProvider; private readonly IFileProvider _fileProvider;
@ -103,15 +102,15 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
private DiagnosticMessage CreateDiagnosticMessage(RazorError error, string filePath) private DiagnosticMessage CreateDiagnosticMessage(RazorError error, string filePath)
{ {
return new DiagnosticMessage( return new DiagnosticMessage(
RazorErrorCode, errorCode: null,
error.Message, message: error.Message,
$"{error} ({error.Location.LineIndex},{error.Location.CharacterIndex}) {error.Message}", formattedMessage: $"{error} ({error.Location.LineIndex},{error.Location.CharacterIndex}) {error.Message}",
filePath, filePath: filePath,
DiagnosticMessageSeverity.Error, severity: DiagnosticMessageSeverity.Error,
error.Location.LineIndex + 1, startLine: error.Location.LineIndex + 1,
error.Location.CharacterIndex, startColumn: error.Location.CharacterIndex,
error.Location.LineIndex + 1, endLine: error.Location.LineIndex + 1,
error.Location.CharacterIndex + error.Length); endColumn: error.Location.CharacterIndex + error.Length);
} }
private string ReadFileContentsSafely(string relativePath) private string ReadFileContentsSafely(string relativePath)