Note: Still a WIP

Problems

Execution Phases

JobPhaseWhat is thrown intentionally?What is thrown accidentally?Where thrown?Detect where?Message templateExample errorExample messageMessage in 1.9
REPLRead / reading sourceIOEx, RuntimeEx, NumberFormatEx, IllegalArgumentEx, IllegalStateEx, UnsupportedOpExN/A

LispReader

wrapped in ReaderException in LispReader.read()

Catch during read in clojure.main/repl-readSyntax error reading at (LINE:COL). Cause: CAUSE:::5Syntax error reading at (1:1). Cause: Invalid token: :::5RuntimeException Invalid token: :::5 clojure.lang.Util.runtimeException (Util.java:221)
compileRead / reading sourceIOEx, RuntimeEx, NumberFormatEx, IllegalArgumentEx, IllegalStateEx, UnsupportedOpExN/A

LispReader

wrapped in ReaderException in LispReader.read()

ReaderException replaced with CompilerException in Compiler.compile()

Catch from LispReader.read() in Compiler.compile()

Syntax error reading source file at (SOURCE:LINE:COL). Cause: CAUSE

:::5 in .clj fileSyntax error reading source file at (foo.clj:2:0). Cause: Invalid token: :::5RuntimeException Invalid token: :::5 clojure.lang.Util.runtimeException (Util.java:221)
REPL | compilecompile / macroexpand (spec)ExceptionInfo w/spec keysN/ACompiler.checkSpecs()Catch from checkSpecs in Compiler.macroexpand1()

Syntax error macroexpanding MACRONAME at (SOURCE:LINE:COL):
PROBLEM-LIST

(let [x])

Syntax error macroexpanding clojure.core/let at (foo.clj:10:5):
In: [0] val: () fails spec: :clojure.core.specs.alpha/bindings at: [:args :bindings :init-expr] predicate: any?, Insufficient input

CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/let did not conform to spec:
In: [0] val: () fails spec: :clojure.core.specs.alpha/bindings at: [:args :bindings :init-expr] predicate: any?, Insufficient input
#:clojure.spec.alpha{:problems [{:path [:args :bindings :init-expr], :reason ""Insufficient input"", :pred clojure.core/any?, :val (), :via [:clojure.core.specs.alpha/bindings :clojure.core.specs.alpha/bindings], :in [0]}], :spec #object[clojure.spec.alpha$regex_spec_impl$reify__2436 0x4b45dcb8 ""clojure.spec.alpha$regex_spec_impl$reify__2436@4b45dcb8""], :value ([x]), :args ([x])}, compiling:(foo.clj:10:5)

compilecompile / macroexpand (thrown by macro)thrown by core defmacro impls: IllegalArgEx, IllegalStateEx, Ex, ExInfo community is sameN/Ain macro implementations under Compiler.macroexpand()Catch during invocation of macro in Compiler.macroexpand1()Syntax error macroexpanding MACRONAME at (SOURCE:LINE:COL). Cause: CAUSE(cond 1)Syntax error macroexpanding clojure.core/cond at (foo.clj:10:5). Cause: cond requires an even number of formsIllegalArgumentException cond requires an even number of forms  clojure.core/cond (core.clj:600)
REPL | compilecompile / macroexpand (accidental throw in macro)N/Aeverything but intentional exs in prior rowin macro implementations under Compiler.macroexpand()"Unexpected error macroexpanding MACRONAME at (SOURCE:LINE:COL). Cause: EXCLASS CAUSE(defmulti 5 class)Unexpected error macroexpanding clojure.core/defmulti at (foo.clj:10:5). Cause: ClassCastException java.lang.Long cannot be cast to clojure.lang.IObjClassCastException java.lang.Long cannot be cast to clojure.lang.IObj  clojure.core/with-meta--5142 (core.clj:217)
REPL | compilecompileIOEx, RuntimeEx, NumberFormatEx, IllegalArgumentEx, IllegalStateEx, UnsupportedOpEx, ArityEx, ExceptionInfo, ReflectiveOperationExnot worrying about for now

Compiler expr parsers

wrapped in CompilerException in Compiler.compile()

Catch in analyze or eval in Compiler.compile1()Syntax error compiling EXPRNAME at (SOURCE:LINE:COL). Cause: CAUSE(def 5)Syntax error compiling def at (foo.clj:10:5). Cause: First argument to def must be a SymbolCompilerException java.lang.RuntimeException: First argument to def must be a Symbol, compiling:(foo.clj:5:1)
REPL | runtimeevaluationany (except AssertionError or spec ExceptionInfo)don't differentiateany functionCatch in call to eval in clojure.main/replEvaluation error at STACKFN (STACKSRC:LINE). EXCLASS CAUSE

(/ 1 0)
(+ 1 :a)

Evaluation error at clojure.lang.Numbers.divide (Numbers.java:163). ArithmeticException Divide by zeroArithmeticException Divide by zero  clojure.lang.Numbers.divide (Numbers.java:163)
REPL | runtimeevaluation / spec instrumentExceptionInfo w/spec keysN/Ainstrumented spec"

Evaluation error at STACKFN (STACKSRC:LINE), did not conform to spec:
PROBLEM-LIST

(f :a)

Evaluation error at user/f (foo.clj:10), did not conform to spec:
In: [0] val: :a fails at: [:args :a] predicate: int?

ExceptionInfo Call to #'user/f did not conform to spec:
In: [0] val: :a fails at: [:args :a] predicate: int?
clojure.core/ex-info (core.clj:4739)

REPL | runtimeevaluation / assertion failure or pre/postAssertionErrorN/Aany function"Evaluation error at STACKFN (STACKSRC:LINE), CAUSE(assert false)Evaluation error at user/eval149 (NO_SOURCE_FILE:8), Assert failed: falseAssertionError Assert failed: false  user/eval149 (NO_SOURCE_FILE:8)
REPLprintN/Aallany functionCatch in call to print in clojure.main/replError printing return value at STACKFN (STACKSRC:LINE), encountered: EXCLASS CAUSE ?Error printing return value at some/thing (foo.clj:100). ArithmeticException Divide by 0 

 

Background info

CompilerException

General exception chain form:

Attributes available when choosing how to display: