Skip to content

Commit

Permalink
docs: add documentation to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
armed committed Jun 10, 2022
1 parent 210ecec commit 4acb111
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/k16/gx/beta/error_context.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns k16.gx.beta.error-context)

(defmacro with-err-ctx
"Creates error context by merging value to `k16.gx.beta.error/*err-ctx*`"
[ctx & body]
`(binding [~'k16.gx.beta.errors/*err-ctx*
(merge ~'k16.gx.beta.errors/*err-ctx* ~ctx)]
Expand Down
1 change: 1 addition & 0 deletions src/k16/gx/beta/errors.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(defrecord ErrorContext [error-type node-key node-contents signal-key])

(def ^:dynamic *err-ctx*
"Error context is used for creating/throwing exceptions with contextual data"
(map->ErrorContext {:error-type :general}))

(defn gx-err-data
Expand Down

0 comments on commit 4acb111

Please sign in to comment.