This file is indexed.

/usr/share/doc/libclj-stacktrace-clojure/html/README.html is in libclj-stacktrace-clojure 0.2.6-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>clj-stacktrace</title>
</head>
<body><h1>clj-stacktrace</h1>

<p>A library for creating more readable stacktraces in Clojure programs.</p>

<p>For example, to print a nice stack trace in a REPL:</p>

<pre><code>=&gt; (use 'clj-stacktrace.repl)
=&gt; ("foo")
java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0)
       Compiler.java:5440 clojure.lang.Compiler.eval
       Compiler.java:5391 clojure.lang.Compiler.eval
            core.clj:2382 clojure.core/eval
             main.clj:183 clojure.main/repl[fn]
             main.clj:204 clojure.main/repl[fn]
             main.clj:204 clojure.main/repl
          RestFn.java:422 clojure.lang.RestFn.invoke
             main.clj:262 clojure.main/repl-opt
             main.clj:355 clojure.main/main
          RestFn.java:398 clojure.lang.RestFn.invoke
             Var.java:361 clojure.lang.Var.invoke
             AFn.java:159 clojure.lang.AFn.applyToHelper
             Var.java:482 clojure.lang.Var.applyTo
             main.java:37 clojure.main.main
Caused by: java.lang.String cannot be cast to clojure.lang.IFn
         NO_SOURCE_FILE:2 user/eval100
       Compiler.java:5424 clojure.lang.Compiler.eval
</code></pre>

<p>In stack traces printed by <code>pst</code>:</p>

<ul>
<li>Java methods are described with the usual <code>name.space.ClassName.methodName</code> convention and Clojure functions with their own <code>name.space/function-name</code> convention.</li>
<li>Anonymous clojure functions are denoted by adding an <code>[fn]</code> to their enclosing, named function.</li>
<li>"Caused by" cascades are shown as in regular java stack traces.</li>
<li>Elements are vertically aligned for better readability.</li>
<li>Printing is directed to <code>*out*</code>.</li>
</ul>

<p>If you want to direct the printing to somewhere other than <code>*out*</code>, either use <code>pst-on</code> to specify the output location or <code>pst-str</code> to capture the printing as a string.</p>

<p>The library also offers an API for programatically 'parsing' exceptions. This API is used internal for <code>pst</code> and can be used to e.g. improve development tools. Try for example:</p>

<p><code>clj
(use 'clj-stacktrace.core)
(try
  ("nofn")
  (catch Exception e
    (parse-exception e)))
</code></p>

<h2>Leiningen</h2>

<p>If you use Leiningen, you can install clj-stacktrace on a per-user basis.</p>

<p>For Leiningen 2.x, add the following to <code>~/.lein/profiles.clj</code>:</p>

<p><code>clj
{:user {:dependencies [[clj-stacktrace "0.2.5"]]
        :injections [(let [orig (ns-resolve (doto 'clojure.stacktrace require)
                                            'print-cause-trace)
                           new (ns-resolve (doto 'clj-stacktrace.repl require)
                                           'pst)]
                       (alter-var-root orig (constantly @new)))]}}
</code></p>

<p>For Leiningen 1.x:</p>

<pre><code>$ lein plugin install clj-stacktrace 0.2.5
</code></pre>

<p>Add this to your <code>~/.lein/init.clj</code> file:</p>

<p><code>clj
(try (require 'leiningen.hooks.clj-stacktrace-test)
     (def settings {:repl-options [:init (require 'clj-stacktrace.repl)
                                   :caught 'clj-stacktrace.repl/pst+]})
  (catch java.io.FileNotFoundException _))
</code></p>

<p>The hook will enable clj-stacktrace to be used across all the projects
you work on in clojure.test and other things that use the
clojure.stacktrace library. The <code>:repl-options</code> settings will cause
clj-stacktrace to be used in the repl and swank tasks.</p>

<h2>License</h2>

<p>Copyright © 2009-2012 Mark McGranaghan and contributors.</p>

<p>Released under an MIT license.</p>
</body>
</html>