The Problem

I want deeply detailed information about exceptions, as a generic facility. The information should be useful for programmatic and human consumption.

Assumptions / Constraints

Integrate well with platform

Work ok for interop callers

Exceptions are not for flow control

Phase One

Provide built-in Clojure exception types that are richer than Java exceptions, and eliminate the need for app developers to gen-class their own exception types. Since some information is costly to provide, provide a *debug* flag that allows the costly stuff to be disabled in production.

Debug Builds

the following group of features will be enabled when *debug* is set

assert

*unchecked-math* math becomes checked math

explicit unchecked does not change (might be for semantic reasons)

include locals (and bindings ??) in all thrown errors (or in assertions if this is too hard)

for preconditions: prefix either verify- or assert- to :pre and :post ??

what is the default ??

Errors as Data

Provide built-in types than extend Throwable and implement IPersistentMap. Goal: The new types are capable enough that Clojure programmers can be out of the business of making new Throwable subclasses.