Skip to content

Commit 8fd31d1

Browse files
committed
Always start a new sentence on a new line
Better for handling diffs and merges
1 parent f0b1fd8 commit 8fd31d1

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ For each of the supported colors (black, red, green, yellow, blue, magenta, cyan
3939
The functions are passed a string and wrap the string with ANSI codes to enable an ANSI graphic representation for the text, with a reset after the text.
4040

4141
Note that the exact color interpretation of the ANSI codes varies significantly between platforms and applications, and
42-
is frequently configurable, often using themes. You may need to adjust your application's settings to get an optimum
43-
display.
42+
is frequently configurable, often using themes.
43+
You may need to adjust your application's settings to get an optimum display.
4444

4545
In addition there are functions `bold`, `inverse`, and `italic` and constants `bold-font`, `inverse-font`, `italic-font`, and `reset-font`.
4646

@@ -67,7 +67,8 @@ BinaryData is simply a randomly accessible collection of bytes, with a known len
6767
```
6868

6969
`write-binary` can write to a `java.io.Writer` (defaulting to `*out*`) or a `StringBuilder`(or other things, as
70-
defined by `io.aviso.writer/StringWriter` protocol). The full version explicitly specifies where to write to, as well as options:
70+
defined by `io.aviso.writer/StringWriter` protocol).
71+
The full version explicitly specifies where to write to, as well as options:
7172

7273
![](https://www.evernote.com/shard/s54/sh/4211f62b-dec6-4134-be0b-5c7f9261a84f/c488966c5ea16355ce50445401a965e9/deep/0/exception.clj----pretty----pretty------workspaces-annadale-pretty-.png)
7374

@@ -136,17 +137,18 @@ failed with ABC123
136137

137138
On a good day, the exception messages will include all the details you need to resolve the problem ... even though
138139
Clojure encourages you to use a `ex-info` which puts important data into properties of the exception, which are not
139-
normally printed. Meanwhile, you will have to mentally scan and parse the above text explosion, to parse out
140-
file names and line numbers, and to work backwards from mangled Java names to Clojure names. It's one more bit of cognitive
141-
load you just don't need in your day.
140+
normally printed.
141+
Meanwhile, you will have to mentally scan and parse the above text explosion, to parse out file names and line numbers,
142+
and to work backwards from mangled Java names to Clojure names.
143+
It's one more bit of cognitive load you just don't need in your day.
142144

143145
Instead, here's the equivalent, via `write-exception`:
144146

145147
![](https://www.evernote.com/shard/s54/sh/9df8600b-adf2-4605-8298-48d78aa93dd7/e0fccbe84d3de74091ccc0fc3c70d411/deep/0/README.md----pretty----pretty------workspaces-annadale-pretty-.png)
146148

147-
`write-exception` navigates down the exception hierarchy; it only presents the stack trace for the deepest, or root, exception. It can navigate
148-
any property that returns a non-nil Throwable type, not just the rootCause property; this makes it properly expand older exceptions
149-
that do not set the rootCause property.
149+
`write-exception` navigates down the exception hierarchy; it only presents the stack trace for the deepest, or root, exception.
150+
It can navigate any property that returns a non-nil Throwable type, not just the rootCause property;
151+
this makes it properly expand older exceptions that do not set the rootCause property.
150152

151153
It displays the class name of each exception, its message, and any non-nil properties of the exception.
152154

@@ -170,9 +172,9 @@ to your project (or to `~/.lein/profiles.clj`):
170172
}
171173
```
172174

173-
This adds nREPL middleware to enable pretty exception reporting. When exceptions occur in the REPL, they are printed out
174-
without a stack trace or properties. The `clojure.repl/pst` function is overridden to fully print the exception
175-
(_with_ properties and stack trace).
175+
This adds nREPL middleware to enable pretty exception reporting.
176+
When exceptions occur in the REPL, they are printed out without a stack trace or properties.
177+
The `clojure.repl/pst` function is overridden to fully print the exception (_with_ properties and stack trace).
176178

177179
In addition, `clojure.stacktrace/print-stack-trace` and `clojure.stacktrace/print-cause-trace` are overwritten; these
178180
are used by `clojure.test`. Both do the same thing, print out the full exception.
@@ -187,8 +189,8 @@ Some column definitions are just a string to be written for that column, such as
187189
`format-columns` returns a function that accepts a StringWriter (such as `*out*`) and the column values.
188190

189191
`write-rows` takes the function provided by `format-columns`, plus a set of functions to extract column values,
190-
plus a seq of rows. In most cases, the rows are maps, and the extraction functions are keywords (isn't Clojure
191-
magical that way?).
192+
plus a seq of rows.
193+
In most cases, the rows are maps, and the extraction functions are keywords (isn't Clojure magical that way?).
192194

193195
Here's an example, from the exception namespace:
194196

0 commit comments

Comments
 (0)