Skip to content

Commit

Permalink
cljdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenet committed Oct 14, 2019
1 parent 065467d commit 9982568
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ Some real life examples of usage for this:
* Skip sentry logging for some kind of exceptions (or the inverse)


## Api docs

[![cljdoc badge](https://cljdoc.xyz/badge/exoscale/ex)](https://cljdoc.xyz/d/exoscale/ex/CURRENT)
[![cljdoc badge](https://cljdoc.xyz/badge/exoscale/ex-manifold)](https://cljdoc.xyz/d/exoscale/ex-manifold/CURRENT)
[![cljdoc badge](https://cljdoc.xyz/badge/exoscale/ex-auspex)](https://cljdoc.xyz/d/exoscale/ex-auspex/CURRENT)

## Installation

[![Clojars Project](https://img.shields.io/clojars/v/exoscale/ex.svg)](https://clojars.org/exoscale/ex)
Expand Down
2 changes: 1 addition & 1 deletion modules/ex/src/clj/exoscale/ex.clj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
[type spec]
(defmethod ex-data-spec type [_] spec))

(defn assert-ex-data-valid
(defn ^:no-doc assert-ex-data-valid
"ex-data Validator function"
[ex-data]
(s/assert ::ex-data ex-data))
Expand Down
6 changes: 3 additions & 3 deletions modules/ex/src/clj/exoscale/ex/exception.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
(:require [exoscale.ex :as ex]
[clojure.spec.alpha :as s]))

(defmacro gen-ex-fn-for-type
(defmacro ^:no-doc gen-ex-fn-for-type
[type]
(let [sym (symbol (name type))]
`(defn ~sym
~(format (str "Returns an ex-info with ex-data `:type` set to %s. Rest of"
~(format (str "Returns an ex-info with ex-data `:type` set to %s. Rest of "
"the arguments match `ex-info`")
type)
([msg# data#]
Expand All @@ -16,7 +16,7 @@
(ex/assert-ex-data-valid data#)
(ex-info msg# data# cause#))))))

(defmacro gen-base-types
(defmacro ^:no-doc gen-base-types
[]
`(do
~@(map (fn [t] `(gen-ex-fn-for-type ~t))
Expand Down

0 comments on commit 9982568

Please sign in to comment.