Completed
Details
Assignee
UnassignedUnassignedReporter
Hugo DuncanHugo DuncanLabels
Approval
OkPatch
CodePriority
MajorAffects versions
Fix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Hugo Duncan
Hugo DuncanLabels
Approval
Ok
Patch
Code
Priority

Affects versions
Fix versions
Created February 24, 2012 at 6:01 PM
Updated November 23, 2013 at 1:06 AM
Resolved November 23, 2013 at 1:06 AM
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;
With the latest Clojure master as of Aug 24 2013, this generates the following exception, with no source file or line number except the one shown in clojure.core:
You can find a source file in your project if you painstakingly search through the stack trace, but it would be nice if it jumped out at you in the exception itself.
Patch: clj-939-v4.diff
Approach: The latest patch does not modify the behavior of any other exceptions thrown by the compiler. The
throw-if
function is only used in the load-related functions: this patch changes it to throwCompilerException
instead ofException
. As a result, exceptions which occur while loading files will be decorated with file names and line/column numbers. The line/column numbers are not always accurate (see notes in attachmentscreen-clj-939.org
) but the file names are correct.This is an incremental improvement to compile-time error messages, but it does not solve some of the fundamental problems with reporting correct line/column numbers from errors thrown by the compiler.
Screened by: Stuart Sierra (re-screened by Alex for the specific comments by Rich)