Skip to content

Commit 23e6636

Browse files
author
dnolen
committed
docstring for cljs.stacktrace/parse-stacktrace
1 parent 6cf8b44 commit 23e6636

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main/cljs/cljs/stacktrace.cljc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@
1414
#?(:clj (:import [java.util.regex Pattern]
1515
[java.io File])))
1616

17-
(defmulti parse-stacktrace (fn [repl-env st err opts] (:ua-product err)))
17+
(defmulti parse-stacktrace
18+
"Parse a JavaScript stacktrace string into a canonical data form. The
19+
arguments:
20+
21+
repl-env - the repl environment, an optional map with :host and :port keys
22+
if the stacktrace includes url, not file references
23+
st - the original stacktrace string to parse
24+
err - an error map. :ua-product key defines the type of stacktrace parser
25+
to use, for example :chrome
26+
opts - additional options. :output-dir maybe given in this argument if
27+
:host and :port do not apply, for example, a file path
28+
29+
The canonical stacktrace representation can easily be mapped to a
30+
ClojureScript one see mapped-stacktrace and mapped-stacktrace-str"
31+
(fn [repl-env st err opts] (:ua-product err)))
1832

1933
(defn parse-int [s]
2034
#?(:clj (Long/parseLong s)

0 commit comments

Comments
 (0)