Throw informative exception when IBootstrapper.GetAssemblyFileNamesToScanForExtensions returns null
See original GitHub issueFrom a conversation in #1683. At that point I suggested a UserCallbackException
, but the documentation for that class says it’s “An exception thrown when a user-provided callback throws an exception”, so we should either consider a different exception or update the docs for that class.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
FakeItEasy
New Add creation option that would allow calling object class methods on a strict Fake (#1765) Throw informative exception when IBootstrapper.
Read more >FakeItEasy/CHANGELOG and FakeItEasy Releases | LibHunt
... Throw informative exception when IBootstrapper.GetAssemblyFileNamesToScanForExtensions returns null (#1689); ➕ Add ArgumentConstraintManagerExtensions.
Read more >what is different between return null and throw exception?
Normally, throwing an exception is superior because it is considerably more informative than returning null, and because calling code can't ...
Read more >Why are null references shunned while throwing ...
A Null reference usually occurs because something in the program logic was missed, ie: you got to a line of code without going...
Read more >Discussion of Why null in C# is so bad
Throw exceptions, return error objects or whatever, but do not return null. Null is contains zero information and has no meaning.
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
Ah, sorry, I misread the issue.
We could just throw
InvalidOperationException
, I think.This change has been released as part of FakeItEasy 6.1.0.