### Rule `LocalizedException` SHOULD only be thrown in the Presentation layer (Controllers, Blocks). Source: [Technical Guidelines](https://devdocs.magento.com/guides/v2.3/coding-standards/technical-guidelines.html). ### Possible Implementation Subscribe to the `T_THROW` token. If `LocalizedException` is thrown, check if file path contains `Block` or `Controller.` If not, raise a warning.