Clojure

Add source and line members and getters to CompilerException

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Ok

Description

To improve the reliability and ease of using CompilerException in tooling, add source path and line getters to CompilerException.

When handling compiler exceptions programmatically, the source path and line currently have to be parsed out of the compiler exception.

Activity

Hide
Hugo Duncan added a comment -

OK, I'm blind - the source is already there - the line number would be nice though.

Show
Hugo Duncan added a comment - OK, I'm blind - the source is already there - the line number would be nice though.
Hide
Hugo Duncan added a comment -

On clojure-1.3.0

Show
Hugo Duncan added a comment - On clojure-1.3.0
Hide
Andy Fingerhut added a comment -

clj-788-add-line-member-and-getter-to-CompilerException-patch.txt is identical to Hugo's, but for some reason that isn't obvious to me his did not apply cleanly to latest master when I tried it out, but this one does.

Compiles without warnings and passes all tests.

Show
Andy Fingerhut added a comment - clj-788-add-line-member-and-getter-to-CompilerException-patch.txt is identical to Hugo's, but for some reason that isn't obvious to me his did not apply cleanly to latest master when I tried it out, but this one does. Compiles without warnings and passes all tests.
Hide
Stuart Halloway added a comment -

Would it make sense to have CompilerException inherit from ExceptionInfo, now that we have the latter?

Show
Stuart Halloway added a comment - Would it make sense to have CompilerException inherit from ExceptionInfo, now that we have the latter?
Hide
Rich Hickey added a comment -

what patch am I supposed to be looking at?

Show
Rich Hickey added a comment - what patch am I supposed to be looking at?
Hide
Andy Fingerhut added a comment -

They are identical except for context lines. clj-788-add-line-member-and-getter-to-CompilerException-patch.txt is the only one that applies cleanly to latest master as of June 15, 2012.

Show
Andy Fingerhut added a comment - They are identical except for context lines. clj-788-add-line-member-and-getter-to-CompilerException-patch.txt is the only one that applies cleanly to latest master as of June 15, 2012.
Hide
Brandon Bloom added a comment -
Show
Brandon Bloom added a comment - What about getColumn ? http://dev.clojure.org/jira/browse/CLJ-960
Hide
Andy Fingerhut added a comment -

Brandon, just a warning that while anyone who looks at this ticket will see your comment, not many people examine closed tickets looking for things to do with them. If by your comment you mean that you think some additional change should be made to Clojure that wasn't made with the patch on this ticket (which I think was committed), nor by the patch committed for CLJ-960, bringing it up in the clojure-dev group, or opening another ticket, might be more effective.

Show
Andy Fingerhut added a comment - Brandon, just a warning that while anyone who looks at this ticket will see your comment, not many people examine closed tickets looking for things to do with them. If by your comment you mean that you think some additional change should be made to Clojure that wasn't made with the patch on this ticket (which I think was committed), nor by the patch committed for CLJ-960, bringing it up in the clojure-dev group, or opening another ticket, might be more effective.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: