contributte / contributte/datagrid
Correct exception type
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 296
- Forks
- 215
- PR merge metrics
- No merged PRs in 30d
Description
Hi, shouldn't \Ublaboo\DataGrid\Exception\DataGridException extend \LogicException instead of \Exception?
Because I don't want to propagate nor catch those exceptions, they appear to be in methods like setSortable or setRenderer and my IDE (PhpStorm) is always reporting there is exception that is not handled, but those kind of exceptions are logic exceptions, only if there is a serious bug caused by code, the exceptions should be thrown, and there is no reason to catch them, only avoid them.

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the DataGridException class and inspect how it is used by methods such as setSortable and setRenderer. Compare the exception hierarchy with the issue's request, then verify that the resulting type matches the intended handling of logic errors without changing the affected method behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100