sane, assuming the mapped raise doesn't escape the bounds of the original raise?
y
Youssef Shoaib [MOD]
02/28/2025, 2:32 PM
It's sane yes, but
withError
is preferred, mostly because it can do it
inline
p
phldavies
02/28/2025, 2:59 PM
I'm storing a reference to the contramapped raise in a class (that lives entirely within the scope), otherwise I'd have used withError 🙂
y
Youssef Shoaib [MOD]
02/28/2025, 3:01 PM
Yeah that's fine then! We've had Raise implementations that basically did that (e.g. IorRaise), but I was keen to move away from that to prepare for context parameters (so that
recover
would work naturally and replace the Raise), however as an implementation it's absolutely fine