Problems to address:
Refine error phases to separate "syntax checking" from the phase itself (in compile and macroexpand)
Use phase names that better reflect the actual location of the error (ie :read-source rather than :read)
Break ex-str into two parts: ex-triage (semantic analysis of Throwable data) and ex-str (string-making) to increase options for reuse by other tools
For execution errors, report the line in the stack reflecting the user operation (outside core), rather than in the guts of core (RT.java, etc)
Accept meta on repl forms (:clojure.core/eval-file or :line) and use that as if it was the source file/line.
CompilerException - adjust phase names
remove private isMacroSyntaxCheck() - now covered at point of capture
set correct compiler exception phase. currently we bucket all compile errors into :compile-syntax-check. later, we can refine compiler errors and separate some into :compilation. Right now, there is no consistent use of exceptions or way to do this. The code is all ready to work when those change are made.
modify eval() to look for and bind file and source-path based on meta :clojure.core/eval-file
removed some commented out dead code
added predicate to determine whether stack frame class is a core class
added renumbering-read to allow a re-read with line number set from first read
removed init-cause (no longer needed)
added ex-triage, which takes Throwable->map data and emits an error analysis
made ex-str (new in 1.10) take ex-triage data as input and produce a string
repl-caught - now uses Throwable->map, ex-triage
repl - uses new phase name, removes file setting (moved to Compiler.eval())
repl.clj - updated phases to report special message for pst
Also see attached error-results.txt file showing output of a set of examples in each phase. Additional manual tests were run against errors reporting from within files, rather than at repl.
-2 patch adds some new function meta, some doc string changes in ex-triage, and handles the case where the JVM omits the stack.
-3 patch has some fixes in using meta :file and :line annotations
-4 has some more subtle fixes in supporting :file/:line meta