Open FroMage opened 8 months ago
/cc @mkouba (qute)
Now, I still can't understand why I'm getting an error, because I think I'm passing the default argument properly, and this used to work, so perhaps you can tell me what I'm doing wrong,
I don't think that this ever worked but I might be wrong. The problem here is that {#ifError it}
is translated to {#ifError it=it}
and this parameter is intentionally ignored because it's used to signal that there is no "first unnamed parameter" used. I have to think about it for a while, I can't see an obvious fix right now. A workaround is to use an explicit param name; e.g. something like {#ifError val=it}error{/ifError}
and {#if inject:validation.hasError(val)}{nested-content}{/if}
.
but really I think we need to include better info in the Qute error messages when it comes to includes and displaying call stacks.
This won't be easy because a tag/included template currently does not know the context of the parent that included it. I mean, it should be doable... more or less... but it's not exactly a one-liner ;-).
Describe the bug
I'm using the following template:
And I'm getting the following error:
As you can see, I cannot guess what the error is, or even where it is.
Using a debugger, I can find out that the
ifError
call is within the{#errorClassBootstrap 'program'/}
call:tags/errorClassBootstrap.html
:tags/ifError.html
:Now, an error of the following form would have helped me find the issue without a debugger:
Now, I still can't understand why I'm getting an error, because I think I'm passing the default argument properly, and this used to work, so perhaps you can tell me what I'm doing wrong, but really I think we need to include better info in the Qute error messages when it comes to includes and displaying call stacks.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response