recide.sanex

*sanitization-level*

dynamic

apply-suppression

(apply-suppression {:keys [cause message stack-trace type data], :as error-components} {:keys [suppress-cause? suppress-message? suppress-stack? suppress-data?], :as suppression-levels})

Returns a new map of error-components with the suppression-levels applied. Suppression level values are handled on a truthy basis. This is a lower-level utility and ignores :suppress-recursively?.

default-sanitization

noop-sanitization

sanitary?

(sanitary? t)

Returns false for all exceptions unless they are ISanitized or recide errors. For recide, this examines the map for the key ::sanitary. Returns false, true, or a map of suppression options.

sanitize

(sanitize t)(sanitize t opts)

Sanitizes the Throwable t according to recide.sanex/*sanitization-level*, subject to optional overrides in opts.

specify-sanitization

(specify-sanitization x sanitization)

x : error / error-ex / ex-data sanitization : true / false / map

When sanitization is a boolean, it applies either no sanitization (false) or the sanitization level defined in recide.sanex/*sanitization-level* (true).

When sanitization is a map, it may specify booleans for the following keys: - :suppress-data? - :suppress-cause? - :suppress-message? - :suppress-stack? - :suppress-recursively?

This map will be merged onto recide.sanex/*sanitization-level*

without-sanitization

macro

(without-sanitization & body)

Executes body with the sanitization level set to recide.sanex/noop-sanitization.