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

Provide meaningful exception codes #71

Open
TravisCarden opened this issue Feb 22, 2023 · 0 comments
Open

Provide meaningful exception codes #71

TravisCarden opened this issue Feb 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@TravisCarden
Copy link
Collaborator

Exceptions don't currently follow any particular rule for their exception codes. The default values are used for new exceptions, and wrapping exceptions just use the code of the exception they wrap. As such, they provide no real value, whereas they could be useful in cases such as Handle "Composer not found" error better in ComposerExecutableValidator [#3321966] | Drupal.org, not to mention automated tests.

Settle on an exception code scheme and implement it. Codes should be defined as public constants on exception classes or interfaces, or maybe as enums in PHP 8.

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

No branches or pull requests

1 participant