Liking cljdoc? Tell your friends :D
Clojure only.

boundary.devtools.core.error-classifier

Classify exceptions into BND-xxx error codes. Pure functions — catalog data loaded once at namespace init via boundary.devtools.error-codes.

Classification strategy (ordered, first match wins):

  1. ex-data with :boundary/error-code — direct BND code
  2. ex-data pattern matching — infer from :type, :schema, :malli/error
  3. Message pattern — regex on .getMessage()
  4. Exception type — SQLException, ConnectException, etc.
  5. Unclassified — nil code
Classify exceptions into BND-xxx error codes.
Pure functions — catalog data loaded once at namespace init via boundary.devtools.error-codes.

Classification strategy (ordered, first match wins):
1. ex-data with :boundary/error-code — direct BND code
2. ex-data pattern matching — infer from :type, :schema, :malli/error
3. Message pattern — regex on .getMessage()
4. Exception type — SQLException, ConnectException, etc.
5. Unclassified — nil code
raw docstring

classifyclj

(classify exception)

Classify an exception into a BND-xxx error code.

Walks the cause chain: if the outermost exception has :boundary/error-code in ex-data (strategy 1), that takes precedence. Otherwise, classifies the root cause.

Returns a map with :code, :category, :exception, :data, :source or a map with :code nil for unclassified errors.

Classify an exception into a BND-xxx error code.

Walks the cause chain: if the outermost exception has :boundary/error-code
in ex-data (strategy 1), that takes precedence. Otherwise, classifies the
root cause.

Returns a map with :code, :category, :exception, :data, :source
or a map with :code nil for unclassified errors.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close