Today I found myself using assoc-in
on the ex-data
inside an exception while keeping the rest of the info the same, then re-forming and re-throwing. It definitely felt like a "Specter-shaped" problem. Is this the sort of thing Specter could do (or already does)? If so, what would be the approach to implementing a navigator for a closed data object like an IExceptionInfo
?
@robert.mather.rmm you can make customer navigators with defnav
though for that i think the best approach would be something like the new datafy stuff
where you can turn the closed object into regular clojure data, navigate it normally, and then at the end convert it back
so something like this would be ideal: (transform [DATAFY :some-field ALL] inc some-obj)
, where DATAFY
would do the conversion both ways