Skip to content

Commit 80c3322

Browse files
committed
Introduce a newline constant
1 parent 2553a83 commit 80c3322

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/io/aviso/exception.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
(justify line-width line)
195195
(w/write " ")
196196
(justify class-width class)
197-
(w/writes "." method \newline)))))
197+
(w/writes "." method w/newline)))))
198198

199199

200200
(defn write-exception
@@ -217,10 +217,10 @@
217217
(justify writer exception-column-width exception-font (:name e) reset-font)
218218
;; TODO: Handle no message for the exception specially
219219
(w/writes writer ":"
220-
(if message
221-
(str " " message-font message reset-font)
222-
"")
223-
\newline)
220+
(if message
221+
(str " " message-font message reset-font)
222+
"")
223+
w/newline)
224224

225225
(let [properties (update-keys (:properties e) name)
226226
prop-keys (keys properties)
@@ -231,7 +231,7 @@
231231
(max-length prop-keys))]
232232
(doseq [k (sort prop-keys)]
233233
(justify writer prop-name-width property-font k reset-font)
234-
(w/writes writer ": " (get properties k) \newline))
234+
(w/writes writer ": " (get properties k) w/newline))
235235
(if (:root e)
236236
(write-stack-trace writer exception))))))))
237237

src/io/aviso/writer.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@
1616
1717
This is used to get around the fact that protocols do not support varadic parameters."
1818
[writer & values]
19-
(write writer (apply str values)))
19+
(write writer (apply str values)))
20+
21+
(def newline
22+
"End-of-line terminator, platform specific."
23+
(System/getProperty "line.separator"))
24+

0 commit comments

Comments
 (0)