Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
- Can override the style's :marker in a specific annotation
- Markers must be strings or function (previously chars were allowed)
- Support for three-character markers added (the middle character is repeated to pad)
- Can omit line numbers with `annotate-lines`
- Can omit line numbers with `annotate-lines`
- `clj-commons.format.exceceptions/default-frame-rules`:
- `clojure.core/with-bindings*` and `clojure.core/apply` are now hidden, not omitted
- terminate at any `clojure.main` function

[Closed Issues](https://github.com/clj-commons/pretty/milestone/59?closed=1)

## 3.4.1 -- 23 Jun 2025

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Pretty can output pretty tabular data:
{:method :get
:path "/status"
:route-name :status}])

(print-table
[:method
:path
Expand Down
15 changes: 8 additions & 7 deletions src/clj_commons/format/exceptions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,18 @@
* omit `clojure.core/with-bindings*` and `clojure.core/apply`
* hide everything in `sun.reflect`
* omit a number of functions in `clojure.test`
* terminate at `speclj.*`, `clojure.main/main*`, `clojure.main/repl/read-eval-print`, or `nrepl.middleware.interruptible-eval`
* terminate at `speclj.*`, `clojure.main/.*`, or `nrepl.middleware.interruptible-eval`
"
[[:package "clojure.lang" :omit]
[:name "clojure.core/with-bindings*" :omit]
[[:name "clojure.core/apply" :hide]
[:id #"\Qclojure.lang.AFn.applyTo\E(Helper)?.*" :hide]
[:package "clojure.lang" :omit]
[:name "clojure.core/with-bindings*" :hide]
[:package #"sun\.reflect.*" :hide]
[:package "java.lang.reflect" :omit]
[:name #"speclj\..*" :terminate]
[:name "clojure.core/apply" :omit]
[:name #"nrepl\.middleware\.interruptible-eval/.*" :terminate]
[:name #"clojure\.main/repl/read-eval-print.*" :terminate]
[:name #"clojure\.main/main.*" :terminate]
[:name #"\Qnrepl.middleware.interruptible-eval/\E.*" :terminate]
[:name #"\Qclojure.main/\E.*" :terminate]
[:name "clojure.test/run-tests" :terminate]
[:name #"\Qclojure.test/\E(test-ns|test-all-vars|default-fixture).*" :omit]])

(def ^{:added "0.1.18"
Expand Down
7 changes: 5 additions & 2 deletions test/demo.clj
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@
(prn `-main :args args)
(println "Clojure version: " *clojure-version*)
(println "Installing pretty exceptions ...")
(repl/install-pretty-exceptions)
(pout [:bold.green "ok"])
(pst (make-exception))

(do
(repl/install-pretty-exceptions)
(pst (make-exception)))

(println "\nTesting reporting of repeats:")
(try (countdown 20)
(catch Throwable t (e/print-exception t)))
Expand Down