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:
parent
221a8f4f50
commit
1e1e55b362
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue