Liking cljdoc? Tell your friends :D

wire-report.error


*ua-product*cljs

source

_demungecljs

(_demunge munged)
source

err->mapcljs

(err->map err & {:keys [exclude-files] :exclude-files nil})

convert a js-error into a more ergonomic map opts: :exclude-files coll<string> - strings used to restrict collected stack lines

The point of the user-stack is to remove noise in a raw error stack by providing a cutoff point via a string/includes? test. For example, when a test has an uncaught error, you can safely assume that the error occured in YOUR code, not the cljs.test harness. So all stacklines that are cljs.test and deeper are automatically removed (cljs/test.js is built-in).

From here the :incident is the deepest point in the user-stack that passes the file-exclusions. This may or may not be what you want but its a start.

{:message 'same as js-error' :type :TypeError :incident -> deepest user-stack map, {:file 'pathto/file.js' :column number :line number :function 'string$from$raw_trace' :var 'demunged.function/sy - may not exist & my not be correct if it does - cljs.core/demunge broken, see https://dev.clojure.org/jira/browse/CLJS-1726 - maybe use devtools.munging/break-into-parts, use as symbols to lookup in cache?} :user-stack [{:function :column :line :file :var} {..} {..} ...] - includes :incident in last spot :raw js/Error}

convert a js-error into a more ergonomic map
opts:
  :exclude-files coll<string>
    - strings used to restrict collected stack lines

The point of the user-stack is to remove noise in a raw error stack by providing
a cutoff point via a string/includes? test. For example, when a test has an
uncaught error, you can safely assume that the error occured in YOUR code,
not the cljs.test harness. So all stacklines that are cljs.test and deeper
are automatically removed (cljs/test.js is built-in).

From here the :incident is the deepest point in the user-stack that passes
the file-exclusions. This may or may not be what you want but its a start.

 {:message 'same as js-error'
  :type :TypeError
  :incident -> deepest user-stack map,
     {:file 'pathto/file.js'
      :column number
      :line number
      :function 'string$from$raw_trace'
      :var 'demunged.function/sy
         - may not exist & my not be correct if it does
         - cljs.core/demunge broken, see https://dev.clojure.org/jira/browse/CLJS-1726
           - maybe use devtools.munging/break-into-parts, use as symbols to lookup in cache?}
  :user-stack [{:function :column :line :file :var} {..} {..} ...]
    - includes :incident in last spot
  :raw js/Error}
sourceraw docstring

includes-any?cljs

(includes-any? st bad-strings)
source

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

× close