Utilities to assist with REPL-oriented development.
Utilities to assist with REPL-oriented development.
(-main & args)
Installs pretty exceptions, then delegates to clojure.main/main.
Installs pretty exceptions, then delegates to clojure.main/main.
(install-pretty-exceptions)
Installs an override that outputs pretty exceptions when caught by the main REPL loop. Also, overrides
clojure.repl/pst
, clojure.stacktrace/print-stack-trace
, clojure.stacktrace/print-cause-trace
.
In addition, installs an uncaught-exception-handler
so that uncaught exceptions in non-REPL threads
will be printed reasonably.
Caught exceptions do not print the stack trace; the pst replacement does.
Installs an override that outputs pretty exceptions when caught by the main REPL loop. Also, overrides `clojure.repl/pst`, `clojure.stacktrace/print-stack-trace`, `clojure.stacktrace/print-cause-trace`. In addition, installs an [[uncaught-exception-handler]] so that uncaught exceptions in non-REPL threads will be printed reasonably. Caught exceptions do not print the stack trace; the pst replacement does.
(pretty-print-stack-trace tr)
(pretty-print-stack-trace tr n)
Replacement for clojure.stacktrace/print-stack-trace
and print-cause-trace
. These functions are used by clojure.test
.
Replacement for `clojure.stacktrace/print-stack-trace` and `print-cause-trace`. These functions are used by `clojure.test`.
(pretty-pst)
(pretty-pst e-or-depth)
(pretty-pst e depth)
Used as an override of clojure.repl/pst
but uses pretty formatting.
Used as an override of `clojure.repl/pst` but uses pretty formatting.
(pretty-repl-caught e)
A replacement for clojure.main/repl-caught
that prints the exception to *err*
, without a stack trace or properties.
A replacement for `clojure.main/repl-caught` that prints the exception to `*err*`, without a stack trace or properties.
(uncaught-exception-handler)
Returns a reified UncaughtExceptionHandler that prints the formatted exception to *err*
.
Returns a reified UncaughtExceptionHandler that prints the formatted exception to `*err*`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close