Closed larowlan closed 8 months ago
Just ran into this. I think it is the following code:
new Promise(async (resolve) => {
const { includes, code } = await compileTemplate(
template,
file,
options
)
includes.forEach(processIncludes)
resolve(code)
})
Changing it to the following helped me find the issue in my twig template.
new Promise(async (resolve) => {
const { includes, code } = await compileTemplate(
template,
file,
options
).catch(errorHandler(id))
if (includes) {
includes.forEach(processIncludes)
}
resolve(code)
})
Chance you could test #3 ?
:tada: This issue has been resolved in version 1.0.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks, I'll test the new version, but looks good to me! I'll let you know if anything comes up.
Steps to reproduce
Include a file with invalid syntax
Entry point:
Invalid file:
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Error compiling twig file".] { code: 'ERR_UNHANDLED_REJECTION' }
Node.js v18.15.0