Improve exception filter parsing error recovery
When we originally introduced exception filters to C#, we used the if keyword in the filter clause. To avoid confusion with regular if statements, we switched to using the when (contextual) keyword. Unfortunately, the if syntax was around long enough that code with that syntax was stored in the source server database. Now, when you try to debug such files, they parse very badly. In particular, there is a file in the debugger in which thousands of lines of text become skipped text trivia and the resulting syntax tree results in an InsufficientExcecutionStackException whenever that file is displayed. This makes it very difficult to inspect older dumps. A simple solution is to allow the if keyword and replace it with a when keyword with an error attached. With this change applied, the debugger crash is resolved.
Showing
想要评论请 注册 或 登录