Clojure

Exceptions thrown in the top level ns form are reported without file or line number

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: Release 1.3, Release 1.4
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Incomplete

Description

If there is an error in the `ns` form, an exception is thrown, which is not caught in `load`.

For example, with an invalid :only clause;

(ns clj14.myns
  (:use
   [clojure.core :only seq]))

This generates a Don't know how to create ISeq from: clojure.lang.Symbol exception, with source file or line number.

Activity

Hide
Hugo Duncan added a comment -

Corrected patch

Show
Hugo Duncan added a comment - Corrected patch
Hide
Andy Fingerhut added a comment -

Patch 0001-report-load-exception-with-file-and-line.diff fails build. Patch 0002-report-load-exception-with-file-and-line.diff applies, builds, and tests cleanly as of March 9, 2012. Hugo has signed a CA.

Show
Andy Fingerhut added a comment - Patch 0001-report-load-exception-with-file-and-line.diff fails build. Patch 0002-report-load-exception-with-file-and-line.diff applies, builds, and tests cleanly as of March 9, 2012. Hugo has signed a CA.
Hide
Andy Fingerhut added a comment -

clj-939-report-load-exceptions-with-file-and-line-patch-v2.txt dated Oct 5 2012 is intended to be an update to Hugo Duncan's patch 0002-report-load-exceptions-with-file-and-line.diff dated Feb 25 2012. Because of Brandon Bloom's recently commited patch adding column numbers in addition to line numbers, this is not simply updating some lines of context, but I think it is correct. It would be good if Hugo could take a look at it and confirm.

Show
Andy Fingerhut added a comment - clj-939-report-load-exceptions-with-file-and-line-patch-v2.txt dated Oct 5 2012 is intended to be an update to Hugo Duncan's patch 0002-report-load-exceptions-with-file-and-line.diff dated Feb 25 2012. Because of Brandon Bloom's recently commited patch adding column numbers in addition to line numbers, this is not simply updating some lines of context, but I think it is correct. It would be good if Hugo could take a look at it and confirm.
Hide
Stuart Sierra added a comment -

Screened.

The error messages are better than what we had before. The line/column numbers are not particularly informative, probably because ns is a macro.

Show
Stuart Sierra added a comment - Screened. The error messages are better than what we had before. The line/column numbers are not particularly informative, probably because ns is a macro.
Hide
Rich Hickey added a comment -

This patch doesn't change the reporting on any other (e.g. nested) exceptions? It looks like it might.

Show
Rich Hickey added a comment - This patch doesn't change the reporting on any other (e.g. nested) exceptions? It looks like it might.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: