This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 165590 - Display compiler errors explanation
Summary: Display compiler errors explanation
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-20 11:55 UTC by Vladimir Kvashin
Modified: 2009-06-19 21:04 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2009-05-20 11:55:49 UTC
Sun compilers provide explanation of compiler error.
They are located in prod/lib/locale/C/LC_MESSAGES/*error_help.html
It would be fine id IDE showed these messages for compiler errors.
Comment 1 Thomas Preisler 2009-06-19 20:26:00 UTC
From Steve C.:

The compilers have two error message catalogs. The default catalog has a one-line error message. The detailed catalog has more elaborate descriptions of 
errors, along with code examples, emitted as html.

The choice of messages is controlled by an environment variable SPRO_EXPAND_ERRORS. If it is not present or is set to NONE, you get the default catalog. 
If it is set to HTML, you get the detailed message catalog.

It appears that when the IDE was switched from Workshop to Netbeans, the functionality disappeared. The detailed message catalogs continue to be 
maintained, however, so all that remains is for the IDE to use them.

C++ Example:

% cat z.cc
class C {
    int i;
} cc;
int main()
{
    cc.i = 3;
}
% CC z.cc
"z.cc", line 6: Error: i is not accessible from main().
1 Error(s) detected.
% setenv SPRO_EXPAND_ERRORS HTML
% CC z.cc
(/home/clamage/test)z.cc:
<HTML>
<PRE>
<A HREF="editor:z.cc:6:0:error:Error: i is not accessible from main().">"z.cc", line 6</A>: Error:<A 
HREF="help:/opt/SUNWspro/prod/bin/../lib/locale/C/LC_MESSAGES/SUNW_SPRO_SC_ccfe.error_help.html:inaccessible:Error i is not accessible from main().
"><IMG SRC="SUNW-internal-info-sign" ALT="Info"></A> i is not accessible from main().
</PRE>
</HTML>
1 Error(s) detected.
:(/home/clamage/test)z.cc

The IDE should have an option to use either the default messages or the detailed messages. For detailed messages, the IDE should set 
SPRO_EXPAND_ERRORS to HTML in the compiler's environment, and interpret the html. (Some interpretation beyond html display is needed.) For default 
messages, SPRO_EXPAND_ERRORS should be removed from the environment, or set to NONE, whichever is more convenient.
*** (#1 of 1): 2009-05-20 13:27:15 PDT Steve