Description
I have a template which has a context assertion. If it panics (i.e., fails), tt doesn't catch it:
#import "...": template
#let document() = [
#show: template
...
]
#assert-panic(document) // Doesn't panic.
// #context assert.eq(catch(document), none) // Doesn't panic.
#document() // Panics.
Alternative Solutions
Hoist context outside of assert-panic/catch, but then users must use this:
#show: doc => context {
show: template.with(
...
)
doc
}
Which is not acceptable.
Additional Context
Context
Description
I have a template which has a
context assertion. If it panics (i.e., fails),ttdoesn't catch it:Alternative Solutions
Hoist
contextoutside ofassert-panic/catch, but then users must use this:Which is not acceptable.
Additional Context
Context