Compilation and macroexpansion exceptions omit cause class name

Description

The updated compiler message format does not include the cause class name:

In both cases, the cause exception name has semantic information (respectively, NoSuchFieldException and ClassNotFoundException.

Proposed: Include the root class name unless it is RuntimeException or Exception, which don't add anything.

Patch: clj-2435-2.patch

Summary of phases:

  • :read-source - no change, always a ReaderException, not useful

  • :compile-syntax-check - added cause class name

  • :compilation - added cause class name

  • :macro-syntax-check - no change, small fixed set of exceptions: Exception, IllegalArgumentEx, IllegalStateEx, ExceptionInfo (spec)

  • :macroexpansion - added cause class name (could be anything else thrown by a macro)

  • :execution - no change, still include

  • :read-eval-result, rint-eval-result - no change, still include

For all cases that include the class name they were made consistent to NOT report if Exception or RuntimeException.

Environment

None

Activity

Show:
David Bürgin
November 19, 2018, 6:11 PM

With this CLJ-2409 becomes obsolete.

Alex Miller
November 19, 2018, 7:46 PM

Add -2 patch that also does this for macroexpansion.

Completed

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Priority

Major
Configure