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

Attachments

2

Activity

Show:

Alex MillerNovember 19, 2018 at 7:46 PM

Add -2 patch that also does this for macroexpansion.

David BürginNovember 19, 2018 at 6:11 PM

With this CLJ-2409 becomes obsolete.

Completed

Details

Assignee

Reporter

Labels

Approval

Ok

Patch

Code

Priority

Affects versions

Fix versions

Created November 19, 2018 at 5:15 PM
Updated November 19, 2018 at 9:01 PM
Resolved November 19, 2018 at 9:01 PM