Skip to content

ux_icon triggers an exception when icon doesn't exists #2008

Closed
@Seb33300

Description

@Seb33300

Description

The twig ux_icon function always triggers an exception when the icon name doesn't exists.

In my opinion, since icons are usually not a critical feature (most of the time only for design purpose), this should trigger an exception only in dev mode by default and the exception should be catched with an error message in logs in prod mode.

Maybe by adding an option to the UX Icons component to configure this?

Example

I have a feature in my app where the admin can add icons to display in the app.
One icon has been added with a typo and this put few pages of our site down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions