Skip to content
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

Exception is created but not thrown #6320

Closed
AppChecker opened this issue Aug 24, 2016 · 4 comments
Closed

Exception is created but not thrown #6320

AppChecker opened this issue Aug 24, 2016 · 4 comments
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@AppChecker
Copy link

Hello!

  1. In method Collection::filterByProductType:
      if (!is_string($typeFilter) && !is_array($typeFilter)) {
            new \Magento\Framework\Exception\LocalizedException(__('The product type filter specified is incorrect.'));
        }

\Magento\Framework\Exception\LocalizedException is created but not thrown.
Is "throw" keyword missing?

  1. In method AbstractProduct::getModel:
        try {
            $model = $this->_indexFactory->get($this->_indexType);
        } catch (\InvalidArgumentException $e) {
            new \Magento\Framework\Exception\LocalizedException(__('Index type is not valid'));
        }

\Magento\Framework\Exception\LocalizedException is created but not thrown.

These possible defects found by static analyzer AppChecker

@odubovyk
Copy link
Contributor

Internal ticket MAGETWO-57726

@picamator
Copy link

@AppChecker Thanks for reporting.
We've created internal ticket MAGETWO-57727 to fix it.

@AVoskoboinikov AVoskoboinikov added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Aug 29, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 6, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 6, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 6, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 6, 2016
[EAST] MAGETWO-57726 [GitHub] Exception is created but not thrown #6320
@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@AppChecker, thank you for your report.
The issue is already fixed in 2.2.0

@magento-engcom-team magento-engcom-team added 2.1.x Fixed in 2.2.x The issue has been fixed in 2.2 release line Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

@AppChecker, thank you for your report.
The issue is already fixed in 2.2.0

@magento-engcom-team magento-engcom-team added 2.1.x Fixed in 2.2.x The issue has been fixed in 2.2 release line Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests

5 participants