Liking cljdoc? Tell your friends :D

merr.helper


typed-errorclj/s

(typed-error error-type)
(typed-error error-type {:as m :keys [message data cause]})

Returns type specified merr.core.MerrError

=> (def custom-error (partial typed-error ::custom))
var?

=> (:type (custom-error))
::custom

=> (:message (custom-error {:message "hello"}))
"hello"
Returns type specified `merr.core.MerrError`

```
=> (def custom-error (partial typed-error ::custom))
var?

=> (:type (custom-error))
::custom

=> (:message (custom-error {:message "hello"}))
"hello"
```
sourceraw docstring

typed-error?clj/s

(typed-error? error-type err)

Returns true if x is type specified merr.core.MerrError

=> (def custom-error? (partial typed-error? ::custom))
var?

=> (custom-error? (merr.core/error {:type ::custom}))
true

=> (custom-error? (merr.core/error {:type ::another}))
false

=> (derive ::derived ::custom)
nil

=> (custom-error? (merr.core/error {:type ::derived}))
true
Returns `true` if x is type specified `merr.core.MerrError`

```
=> (def custom-error? (partial typed-error? ::custom))
var?

=> (custom-error? (merr.core/error {:type ::custom}))
true

=> (custom-error? (merr.core/error {:type ::another}))
false

=> (derive ::derived ::custom)
nil

=> (custom-error? (merr.core/error {:type ::derived}))
true
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close