Stop throwing first chance exceptions when CreateInstance is called on generic extension point types
See original GitHub issueVery much like #494, only with open generic types. When we try to instantiate argument formatters, fake configurators, and dummy factories, we may try to instantiate an open generic type, causing a first chance exception.
For an example, see Configure_should_be_null_guarded. We try to instantiate TestableConfigurator<T>
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
c# - Avoiding first chance exception messages when the ...
To avoid seeing the messages, right-click on the output window and uncheck "Exception Messages". However, seeing them happen might be nice, ...
Read more >Alternative To Generic Methods where Type is known at ...
I'm trying to follow some of the patterns/conventions that Dapper uses, in particular Dapper.Contrib.Extensions and how the use reflection on ...
Read more >Understanding Exceptions while debugging with Visual ...
Configuring the debugger to break for first chance exceptions To change when the debugger breaks, go to Debug->Windows->Exception Settings.
Read more >IronPython .NET Integration
NET supports generic types which allow the same code to support multiple type ... This allows Python exception thrown from Python code to...
Read more >Core Technologies
You cannot merge different collection types (such as a Map and a List). If you do attempt to do so, an appropriate Exception...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Then they shouldn’t break on first chance exceptions. As I said above, there are many libraries out there which raise first chance exceptions during regular execution.
Yes, that’s a valid reason to change this behaviour.
On that basis, I’m changing this to an enhancement.
I suppose it depends on what we think a “bug” is.
The symptom this issue was intended to correct is unintended behaviour, which I’d argue is undesirable.
Any exception that’s thrown will cause the runtime to fire up some exception-handling mechanisms which could have a number of unwanted effects, such as bothering people who break on first chance exceptions, or just slowing things down.
If we want to say that removing the unintended undesirable behaviour that may bother the user is closer to a performance improvement (and thus enhancement) than a bug, I’m happy.