| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Fault
Description
The request perimeter's fault vocabulary: what the serve boundary says about an exception
that escaped a handler before the response was committed. The pipeline reports every routine
failure as a value, so an escape is either the response-assembly leg's confined RenderEscape
marker or an invariant break nothing classified. classifyEscape folds whichever it is into a
RequestFault, whose bounded cause feeds the ecluse.serve.perimeter.faults metric and whose
rendered detail feeds the perimeter's log line. Neither reaches the client: the response is the
route's contract-admitted neutral 500.
Synopsis
- data RequestFault = RequestFault {}
- classifyEscape :: SomeException -> RequestFault
- newtype RenderEscape = RenderEscape SomeException
Documentation
data RequestFault Source #
One classified perimeter fault: the bounded cause a metric records and the rendered escape for the log line. The detail is diagnostic only, never parsed, and no decision may branch on it.
Constructors
| RequestFault | |
Fields
| |
Instances
| Show RequestFault Source # | |
Defined in Ecluse.Core.Server.Fault Methods showsPrec :: Int -> RequestFault -> ShowS # show :: RequestFault -> String # showList :: [RequestFault] -> ShowS # | |
| Eq RequestFault Source # | |
Defined in Ecluse.Core.Server.Fault | |
classifyEscape :: SomeException -> RequestFault Source #
Fold an escaped exception into the perimeter's vocabulary, UnclassifiedFault by default.
newtype RenderEscape Source #
The confined marker wrapping an exception that escaped the response-assembly render, which
is total by contract. It never crosses the perimeter, which folds it to RenderFault.
Constructors
| RenderEscape SomeException |
Instances
| Exception RenderEscape Source # | |
Defined in Ecluse.Core.Server.Fault Methods toException :: RenderEscape -> SomeException # fromException :: SomeException -> Maybe RenderEscape # displayException :: RenderEscape -> String # backtraceDesired :: RenderEscape -> Bool # | |
| Show RenderEscape Source # | |
Defined in Ecluse.Core.Server.Fault Methods showsPrec :: Int -> RenderEscape -> ShowS # show :: RenderEscape -> String # showList :: [RenderEscape] -> ShowS # | |