Closed shichen85 closed 9 months ago
Your fix to the location offsets make sense -- I forgot they were 1-indexed! Was the actual problem that the new Diagnostic
calls inside the catch
blocks were erroring due to those location offsets being invalid? That would explain why you were still getting a crash -- if an error was being thrown inside the catch then it wouldn't be caught!
But then in that case we don't need that "skip" logic. I'd prefer not to add any more logic to that part of the code if we can help it -- it's already very hard to reason about. If it's sufficient to just have the correct location offsets for the Diagnostic then that's all we should do. If that's NOT sufficient then something else is still going on that we need to address, because that try/catch should solve the problem.
Fair! I have reverted the changes to addMember().
Fixes #191