roslyn: Can we analyze function in try block to suggest exception type for catch?
I think intellisense from roslyn should suggest possible exception that could be thrown from try
block when we want exception type in catch(
At least for direct instance function and static function. Is it possible?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 28 (17 by maintainers)
With that said, someone could work on building this outside of the roslyn project itself using the APIs that we provide
Sounds like the following (big) workitems would need to be done in order for this to work well
These three pieces may exist someday, but today I think this would take a lot of work upfront and not be very accurate on the other end.
This would be a very inaccurate analysis. What would we do if you called into an interface method? What about if you call into anything from metadata? We would end up filtering out viable exceptions that you may want to complete to.
We tend to under-filter rather than over-filter. over-filtering is very risky and can lead to a bad experience.