Closed ericphanson closed 2 years ago
i.e.
StructTypes.StructType(::Type{<:Exception}) = StructTypes.Struct()
I think that's usually the case? (I'm trying to log exceptions as JSON). (This could be superceded by #61, but if we don't go for that, it might still make sense for exceptions).
I was able to accomplish this with
StructTypes.StructType(::Type{E}) where {E <: Exception} = StructTypes.Struct()
Implemented in https://github.com/JuliaData/StructTypes.jl/pull/70
i.e.
I think that's usually the case? (I'm trying to log exceptions as JSON). (This could be superceded by #61, but if we don't go for that, it might still make sense for exceptions).