Skip to content

Commit bfa4780

Browse files
authored
Add dump reporting for #76225 (#78354)
* Add dump reporting for #76225 This is very likely somehow related to #74728 but is proving very difficult to track down without a repro or a dump.
1 parent 5631a0e commit bfa4780

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Workspaces/Core/Portable/Diagnostics/DiagnosticData.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Runtime.Serialization;
1010
using System.Threading;
1111
using System.Threading.Tasks;
12+
using Microsoft.CodeAnalysis.ErrorReporting;
1213
using Microsoft.CodeAnalysis.Host;
1314
using Microsoft.CodeAnalysis.PooledObjects;
1415
using Microsoft.CodeAnalysis.Shared.Extensions;
@@ -180,7 +181,17 @@ void GetLocationInfo(out FileLinePositionSpan originalLineInfo, out FileLinePosi
180181
}
181182
else
182183
{
183-
originalLineInfo = location.GetLineSpan();
184+
try
185+
{
186+
originalLineInfo = location.GetLineSpan();
187+
}
188+
catch (Exception e) when (FatalError.ReportWithDumpAndCatch(e, ErrorSeverity.Critical))
189+
{
190+
// Help track down https://github.com/dotnet/roslyn/issues/76225 which appears to be an
191+
// issue caused by https://github.com/dotnet/roslyn/pull/74728
192+
throw;
193+
}
194+
184195
mappedLineInfo = location.GetMappedLineSpan();
185196
}
186197
}

0 commit comments

Comments
 (0)