Skip to content

Commit 022e588

Browse files
committed
Restore and extend io.aviso shim namespaces
1 parent c9d54b2 commit 022e588

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 3.6.3 -- UNRELEASED
2+
3+
- Restore, at least temporarily, the `io.aviso.exception` and `io.aviso.repl shim` namespaces
4+
- Add a shim for `io.aviso.exception/*traditional*`
5+
6+
[Closed Issues](https://github.com/clj-commons/pretty/milestone/62?closed=1)
7+
18
## 3.6.2 -- 7 Aug 2025
29

310
- Fix a bug where the vertical bar for repeated stack frames could be misaligned

src/io/aviso/exception.clj

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
(ns io.aviso.exception
2+
"A shim in org.clj-commons/pretty to emulate a few key functions from io.aviso/pretty.
3+
4+
This namespace may be deleted in a future release."
5+
{:added "2.5.0"
6+
:deprecated "2.5.0"}
7+
(:require [clj-commons.format.exceptions :as e]))
8+
9+
(defn demangle
10+
[^String s]
11+
(e/demangle s))
12+
13+
(defn format-exception
14+
([exception]
15+
(e/format-exception exception))
16+
([exception options]
17+
(e/format-exception exception options)))
18+
19+
(defn write-exception
20+
([exception]
21+
(e/print-exception exception))
22+
([exception options]
23+
(e/print-exception exception options)))
24+
25+
(def ^:dynamic *default-frame-rules*
26+
"This is provided only to prevent source compilation failures; changing this value does not affect
27+
how the clj-commons.format.exceptions namespace operates."
28+
[])
29+
30+
(def ^:dynamic *fonts*
31+
"This is provided only to prevent source compilation failures; changing this value does not affect
32+
how the clj-commons.format.exceptions namespace operates."
33+
{})
34+
35+
(def ^{:dynamic true
36+
:added "3.6.3"
37+
:deprecated "3.6.3"} *traditional*
38+
"This is provided only to prevent source compilation failures; changing this value does not affect
39+
how the clj-commons.format.exceptions namespace operates."
40+
false)

src/io/aviso/repl.clj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(ns io.aviso.repl
2+
"A shim in org.clj-commons/pretty to emulate a few key functions from io.aviso/pretty.
3+
4+
This namespace may be deleted in a future release."
5+
{:added "2.5.0"
6+
:deprecated "2.5.0"}
7+
(:require [clj-commons.pretty.repl :as repl]))
8+
9+
(defn install-pretty-exceptions
10+
[]
11+
(repl/install-pretty-exceptions))
12+
13+
(defn uncaught-exception-handler
14+
[]
15+
(repl/uncaught-exception-handler))

0 commit comments

Comments
 (0)