PR# 4116 Suggestion to simplify compiler error messages

Problem Report Summary
Submitter: peter_gummer
Category: EiffelStudio
Priority: Medium
Date: 2004/11/14
Class: Feature Request
Severity: Serious
Number: 4116
Release: 5.5.1012
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Synopsis: Suggestion to simplify compiler error messages

Description
I originally posted this suggestion on Nov 5 2004 to http://groups.yahoo.com/group/eiffel_software/message/4605. The subsequent thread discussion generally favoured the idea of a change like this.

Here's my original message:

It's finally got too much for me: I'm tired of not being able to decipher
compiler errors at a glance. The verbosity of EiffelStudio's error messages
causes two problems:

1. The whole error message cannot be seen without scrolling, unless I allow
the Context pane to be almost a third of the height of the screen.

2. There's too much to read. My eyes have to hunt around to find the
pertinent information.

For example, here's my current error. 21 lines. Only 12 lines are visible at
a time in the Context pane at its smallest height (which is what I normally
keep it at).

-------------------------------------------------------------------------------

Error code: VUAR(2)
Type error: non-conforming actual argument in feature call.
What to do: make sure that type of actual argument conforms to type
of corresponding formal argument.

Class: ROLES_FORM
Feature: refresh_recipients
Called feature: set_text (value: SYSTEM_STRING) from WINFORMS_LIST_VIEW_ITEM
Argument name: value
Argument position: 1
Actual argument type: RECIPIENT
Formal argument type: SYSTEM_STRING
Line: 189
recipient.refresh
-> item.set_text (recipient)
end

-------------------------------------------------------------------------------
Degree: 3 Processed: 2 To go: 0 Total: 2


Ok, let's see if we can cut this down without losing any information:
a. Remove the empty 2nd line.
b. Remove the word 'code': I can see it's a code!
c. Move 'Type error' to the previous line.
d. Put the short error description on the same line too.
e. Remove 'What to do': the actual message is obviously telling me what to
do!
f. Remove the line break. Why do we need this? We're not using 80-column
terminals.
g. Remove the empty line after 'What to do'.
h. Put 'Class' and 'Feature' on one line, using normal dot-notation.
i. Shorten 'Called feature' to "Calling'.
j. Shorten 'Argument name' to 'Argument', quoting the name in the normal
way.
k. Remove the 'Argument position' line entirely. I can see that `value' is
at argument position 1!
l. Move the argument's actual type onto the same line.
m. Remove the 'Formal argument type' line entirely. This information is
already shown on the 'Called feature' line.
n. Move the line number up onto the same line as the class and feature. Not
only does this save a line in the error message, it reads better because
these pieces of information are closely related; i.e. they tell me where the
error is.
o. Remove the empty line at the end.
p. Move the line containing the line number, class and feature to the top,
because this is the most important piece of information. (This doesn't
shorten the message, but it indulges another thing I dislike about these
compiler error messages.)

And here's the error, shortened to 11 lines. No information lost, but a
whole lot easier to read:

-------------------------------------------------------------------------------
Line 189: {ROLES_FORM}.refresh_recipients
Type error VUAR(2): non-conforming actual argument in feature call.
Make sure that type of actual argument conforms to type of corresponding
formal argument.
Calling: set_text (value: SYSTEM_STRING) from WINFORMS_LIST_VIEW_ITEM
Argument `value' actual type: RECIPIENT
recipient.refresh
-> item.set_text (recipient)
end
-------------------------------------------------------------------------------
Degree: 3 Processed: 2 To go: 0 Total: 2
To Reproduce

										
Problem Report Interactions
From:peter_gummer    Date:2005/11/11    Download