Suppress repl printing of ex-data for macro spec errors

Description

When a macro fails a spec check at the repl, the message printed includes the (often large) ex-data map generated by spec explain:

As I understand it, checkSpecs in Compiler.java calls macroexpand-check from spec. For failures, macroexpand-check throws an ExceptionInfo with the explain data in the data map. checkSpecs catches this and throws a new CompilerException, passing the ExceptionInfo as the cause. The CompilerException constructor calls toString on the cause, which for ExceptionInfo generates a string with both the message and the data map.

Possibly, you could add a new overload of the CompilerException constructor, which specifies both an explicit message and a cause (using the message in a call to errorMsg). Then checkSpecs could use this overload, passing ExceptionInfo.getMessage and avoiding printing of the data map.

I've marked this as major, because I think the data map dumps have the potential to be intimidating to newcomers.

Environment

None

Assignee

Unassigned

Reporter

Greg Chapman

Labels

None

Approval

None

Patch

None

Affects versions

Priority

Major
Configure