-
-
Notifications
You must be signed in to change notification settings - Fork 450
rector: RemoveUnusedVariableInCatchRector
#4834
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
base: main
Are you sure you want to change the base?
rector: RemoveUnusedVariableInCatchRector
#4834
Conversation
Pls ignore Sonar. |
i'm more curious why the Exceptions aren't used, not even logged with Also since most of Mage core stuff does throw Throwable instead of Exception now, |
I think there is some space for improvements. Want to oen a new issue or discussion for that? |
|
@@ -703,7 +703,7 @@ public static function init($code = '', $type = 'store', $options = [], $modules | |||
} else { | |||
self::$_app->init($code, $type, $options); | |||
} | |||
} catch (Mage_Core_Model_Session_Exception $e) { | |||
} catch (Mage_Core_Model_Session_Exception) { | |||
header('Location: ' . self::getBaseUrl()); | |||
die; | |||
} catch (Mage_Core_Model_Store_Exception $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand the rationale of this PR. Why $e
isn't remove here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. Think I have to report it to rector.
See https://getrector.com/rule-detail/remove-unused-variable-in-catch-rector