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

Change Exception Handling for Non-Existent Components in CBWIRE v4 #142

Open
grantcopley opened this issue Jan 8, 2024 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@grantcopley
Copy link
Collaborator

grantcopley commented Jan 8, 2024

Objective

To update the exception thrown when a non-existent component is called in CBWIRE v4, replacing Injector.InstanceNotFoundException with CBWIREInstanceNotFoundException.

Details

In the current version of CBWIRE (v3), calling a non-existent component results in the system throwing an Injector.InstanceNotFoundException. This needs to be updated in CBWIRE v4 for better clarity and specificity in error handling.

Example Use Case

Consider the following scenario in CBWIRE v3:

#wire( "MyMissingComponent" )#

In this example, when a component named "MissingComponent" (which does not exist) is called, the system throws an Injector.InstanceNotFoundException. The goal is to change this behavior in CBWIRE v4 so that it throws a CBWIREInstanceNotFoundException instead.

Expected Functionality

  • In CBWIRE v4, when a user calls a non-existent component, the system should throw a CBWIREInstanceNotFoundException instead of the current Injector.InstanceNotFoundException.
  • This change should be applied across all instances where non-existent components are called.
  • The new exception (CBWIREInstanceNotFoundException) should be documented in the CBWIRE v4 documentation, including its usage and scenarios where it can be encountered.
@grantcopley grantcopley added this to the v4.0 milestone Jan 8, 2024
@grantcopley grantcopley added enhancement New feature or request good first issue Good for newcomers labels Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant