...
Approach | Type Dispatch | Data Payloads | Out-of-band Communication | Action at Point of Exception | Exceptions as Data | Notes |
|---|---|---|---|---|---|---|
education on dynamic binding | solves | n/a | solves | could solve | n/a |
|
clj-stacktrace | should unify with dataification of exceptions, if any | n/a | n/a | n/a | partially solves for non-Clojure types |
|
ad hoc conditions | worsens | could solve | worsens | solves | orthogonal | worsens = replaces general mechanism with more specialized one |
pattern-matching conditions | ? | could solve | worsens | solves | orthogonal | worsens = replaces general mechanism with more specialized one |
data-carrying exception | could support pattern matching | solves | n/a | n/a | solves for Clojure types |
|
enrich exceptions with local context | n/a | enhanced | for errors only | n/a | enhanced | yuck: makes everybody pay for debug time support |
bindable test/assertion handler | orthogonal | orthogonal | for assertions | for assertions | n/a |
|
bindable throw handler | orthogonal | orthogonal | for Clojure exceptions | for Clojure exceptions | n/a |
|
platform-based handler | orthogonal | orthogonal | solves | solves | n/a | does it exist? |
bindable edge handler | orthogonal | orthogonal | tries and fails | tries and fails | could help | yuck: perf, asymmetry, doesn't accomplish desired goal |
wrap java exceptions | orthogonal | orthogonal | at Clojure boundary | n/a | could support | yuck; terrible perf, terrible asymmetry, or both |
"modest proposal" above | solves | solves | solves, with extra goodness for debug | solves, with extra goodness for debug | solves | what's not to like? see bottom of this page... |
...