We're updating the issue view to help you get more done. 

Provide more options for error reporting in clojure.main

Description

There are some potential improvements to be made in the new error reporting configuration in 1.10.1:

  • change setting from a flag to a set of enumerated values ("file" for temp file reporting, "stderr" for printing to stderr, and "none" for no reporting)

  • allow setting by Java system property (clojure.main.report) in addition to a command-line setting (with --report)

In particular on the last item, current invokers of clojure.main do not know about any new option we add, but do know how to pass a Java system property down. So, allowing setting by Java system property will make it possible for users behind tools like leiningen to control the error reporting without needing additional changes.

Proposed:

Allowed values:

  • file - write report to temp file

  • stderr - write report to stderr

  • none - don't report

Set via:

  • Java system property: -Dclojure.main.report=file

  • clojure.main command line option: --report file, overrides system property

  • Default to file, if not set in either above

Patch: clj-2504-2.patch

Environment

None

Status

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Release 1.10.1

Priority

Major