Fix not shown 'exception page' on non windows system

Occurs on non windows system where Environment.NewLine is LF (1 symbol length) Unix, Linux, OS X etc. And options.ShowExceptionDetails is true.
Replaced number '2' to Environment.NewLine.Length.
This commit is contained in:
turchenkoalex 2014-07-13 21:14:05 +04:00
parent 221a8f4f50
commit 1e1e55b362
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ namespace Microsoft.AspNet.Diagnostics
var stackTrace = ex.StackTrace;
if (!string.IsNullOrEmpty(stackTrace))
{
var heap = new Chunk { Text = stackTrace + Environment.NewLine, End = stackTrace.Length + 2 };
var heap = new Chunk { Text = stackTrace + Environment.NewLine, End = stackTrace.Length + Environment.NewLine.Length };
for (Chunk line = heap.Advance(Environment.NewLine); line.HasValue; line = heap.Advance(Environment.NewLine))
{
yield return StackFrame(line, showSource);