question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Throw informative exception when IBootstrapper.GetAssemblyFileNamesToScanForExtensions returns null

See original GitHub issue

From 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:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thomaslevesquecommented, Nov 7, 2019

Ah, sorry, I misread the issue.

We could just throw InvalidOperationException, I think.

0reactions
afakebotcommented, Jun 8, 2020

This change has been released as part of FakeItEasy 6.1.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found