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

docs: Improve "Error Handling" #8688

Merged
merged 12 commits into from
Apr 2, 2024
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Mar 31, 2024

Description

  • add missing "HTTP Status Code and Error Views"
  • improvements for readability

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the documentation Pull requests for documentation only label Mar 31, 2024
@kenjis kenjis force-pushed the improve-errors.rst branch from 45a0756 to 37931d0 Compare March 31, 2024 01:46
Comment on lines +202 to +206
For example, ``PageNotFoundException`` implements the ``HTTPExceptionInterface``,
so its exception code ``404`` will be the HTTP status code. Therefore if it is
thrown, the system will show the **error_404.php** in the **app/Views/errors/html**
folder when it is a web request. If it is invoked via CLI, the system will show
the **error_404.php** in the **app/Views/errors/cli** folder.
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is the correct behavior, but the current implementation is not.
See #8689

Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

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

LGTM!

@kenjis kenjis merged commit d5660ce into codeigniter4:develop Apr 2, 2024
8 checks passed
@kenjis kenjis deleted the improve-errors.rst branch April 2, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests for documentation only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants