You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SpanArguments should have a field for determining what happens with a thrown exception. The existing default behavior is to do this:
forM_ e $\(SomeException inner) ->do
setStatus s $Error$T.pack $ displayException inner
recordException s []Nothing inner
I think that recordException s [] Nothing inner is probably good to leave in, and the "customizable' stuff will be the setStatus s $ Error $ T.pack $ displayException inner.
newtypeSpanExceptionBehavior { unSpanExceptionBehavior::SomeException->Maybe (Span->IO()) }
derivingnewtype (Semigroup, Monoid)
spanExceptionSetStatusError::SpanExceptionBehavior
spanExceptionSetStatusError =SpanExceptionBehavior\(SomeException inner) ->Just\s -> setStatus s $Error$T.pack displayException inner
addSpanExceptionBehavior::SpanExceptionBehavior->SpanArguments->SpanArguments
addSpanExceptionBehavior new sa = sa { exceptionBehavior = new <> exceptionBehavior sa }
That allows you to compose and combine them. However, it does not allow you to override them. So I think we need something other than Maybe there -
dataOverrideOrCombinea=Overridea
| Combinea
| NothininstanceSemigroupa=>Semigroup (OverrideOrCombinea) whereOverride a <> _ =Override a
_ <>Override a =Override a
Combine a <>Combine b =Combine (a <> b)
Nothin<> r = r
l <>Nothin= l
SpanArguments
should have a field for determining what happens with a thrown exception. The existing default behavior is to do this:I think that
recordException s [] Nothing inner
is probably good to leave in, and the "customizable' stuff will be thesetStatus s $ Error $ T.pack $ displayException inner
.Related: #90
Comment: #91 (comment)
I think I'd like to see something like:
That allows you to compose and combine them. However, it does not allow you to override them. So I think we need something other than
Maybe
there -Then, for the
ExitSuccess
, we can do an override:The text was updated successfully, but these errors were encountered: