Skip to content

Twig syntax errors are not throwing exceptions #628

@HakS

Description

@HakS

kalastatic.build() promise doesn't seem to be returning any TwigException as an error or exception, so it seems to continue trying to render flawed twig files even after Twig.js is displaying syntax errors, which makes it generate even more runtime errors that eventually breaks the browsersync instance

I have Kalastatic running in a custom Node JS command rather than using the kalastatic bin file, however a lot of this code is based on yours (runs kalastatic.build(), when this promise finishes, browsersync watches files, when it detects a change, kalastatic.build() is called again, and here is when this happens)

Please let me know if this is actually an error from Twig or from any of Metalsmith transformers so this ticket gets reported there

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions