Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use friendly exception #386

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

np25071984
Copy link
Contributor

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Fixed issues #324

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (56168c3) to head (3447fdc).

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #386   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       165       167    +2     
===========================================
  Files             11        11           
  Lines            480       486    +6     
===========================================
+ Hits             480       486    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@np25071984
Copy link
Contributor Author

Not sure if #234 and #324 are equal

src/BuildingException.php Outdated Show resolved Hide resolved
src/BuildingException.php Outdated Show resolved Hide resolved
public function getSolution(): ?string
{
return <<<SOLUTION
See (https://github.com/yiisoft/di)[https://github.com/yiisoft/di] for more documentation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's think about what could cause it:

  1. Class wasn't found.
  2. Config wasn't valid.
  3. What else?

I'd provide a list of things to try, such as:

  1. Ensure that either a service with ID "x" is defined or such class exists and is autoloadable.
  2. Ensure that configuration for service with ID "x" is correct.

Docs are not suggesting on how to fix errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants