magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

rector: `RemoveUnusedVariableInCatchRector`

Open sreichel opened this issue 5 months ago • 1 comments

See https://getrector.com/rule-detail/remove-unused-variable-in-catch-rector

sreichel avatar Jun 20 '25 13:06 sreichel

Pls ignore Sonar.

sreichel avatar Jun 27 '25 18:06 sreichel

i'm more curious why the Exceptions aren't used, not even logged with Mage::logException? And in most of the cases where i would throw a different exception, i would use the old exception as previous one.

Also since most of Mage core stuff does throw Throwable instead of Exception now, wouldn't it be better to catch Throwable instead, or is that too dangerous?

Hanmac avatar Jul 06 '25 16:07 Hanmac

I think there is some space for improvements. Want to oen a new issue or discussion for that?

sreichel avatar Jul 06 '25 22:07 sreichel

Quality Gate Failed Quality Gate failed

Failed conditions
8.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar Jul 11 '25 00:07 sonarqubecloud[bot]

Pls ignnore sonar.

(in free version it is not possible to adjust that limit)

sreichel avatar Oct 01 '25 00:10 sreichel

Quality Gate Failed Quality Gate failed

Failed conditions
5.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar Oct 13 '25 15:10 sonarqubecloud[bot]

Merged with one green.

sreichel avatar Oct 13 '25 15:10 sreichel