CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

fix: Exception rework

Open kenjis opened this issue 1 year ago • 4 comments

Description Supersedes #8470 Closes #4358

  • add new Exception classes in CodeIgniter\Exceptions
    • LogicException
    • RuntimeException
    • BadFunctionCallException
    • BadMethodCallException
    • InvalidArgumentException
  • add domain-level ExceptionInterface to catch all Exceptions in the domain
    • Files
    • HTTP
    • Router

exceptions-database-class-dia

  • all Exception classes that the framework throws
    • implement CodeIgniter\Exceptions\ExceptionInterface
    • extend \Exception (not \Error)
    • extend \LogicException or \RuntimeException

exceptions-class-dia

Checklist:

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

kenjis avatar Apr 07 '24 23:04 kenjis

Looks good to me.

MGatner avatar Apr 10 '24 11:04 MGatner

Updated code and added user guide.

kenjis avatar Apr 16 '24 04:04 kenjis

:wave: Hi, @kenjis!

We detected conflicts in your PR against the base branch :speak_no_evil:
You may want to sync :arrows_counterclockwise: your branch with upstream!

Ref: Syncing Your Branch

github-actions[bot] avatar Apr 18 '24 23:04 github-actions[bot]

:wave: Hi, @kenjis!

We detected conflicts in your PR against the base branch :speak_no_evil:
You may want to sync :arrows_counterclockwise: your branch with upstream!

Ref: Syncing Your Branch

github-actions[bot] avatar May 05 '24 23:05 github-actions[bot]

UG changes look good, thanks for the thorough coverage.

MGatner avatar May 23 '24 10:05 MGatner

@MGatner Thanks for the review!

kenjis avatar May 23 '24 12:05 kenjis