Skip to content

[New Rule] LocalizedException SHOULD only be thrown in the Presentation layer #49

Closed
@lenaorobei

Description

@lenaorobei

Rule

LocalizedException SHOULD only be thrown in the Presentation layer (Controllers, Blocks).

Source: Technical Guidelines.

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions