fix: Exception rework
Description See #4358
- add new Exception classes in
CodeIgniter\ExceptionsLogicExceptionRuntimeExceptionBadFunctionCallExceptionBadMethodCallExceptionInvalidArgumentException
- add domain-level
ExceptionInterfaceto catch all Exceptions in the domainFilesHTTPRouter
- all Exception classes that the framework throws
- implement
CodeIgniter\Exceptions\ExceptionInterface - extend
\Exception(not\Error) - extend
\LogicExceptionor\RuntimeException
- implement
Checklist:
- [x] Securely signed commits
- [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
- [ ] Unit testing, with >80% coverage
- [ ] User guide updated
- [x] Conforms to style guide
: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
: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
: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
@codeigniter4/core-team Any comments?
@kenjis I like this one especially LogicException and InvalidArgumentException
But it will be useful to add some explanation and use cases in docs as well on https://www.codeigniter.com/user_guide/general/errors.html#using-exceptions
I would like to document that LogicException means a bug in the app code, so the code should be fixed when LogicException occurs, and that LogicException should not be caught.
I would like to know if this PR may or may not be merged into 4.5.
: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
: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
: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
: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
: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
: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
: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