Re: Misleading error messages

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de groot wrote:

> On Fri, 17 Oct 2003, Lars Ivar Igesund wrote:
> > I don't know if this happens with C, but when compiling
> > D code and the compiler returns an error, aap reports
> > that the buildaction failed in addition to the error message
> > from the compiler.
> 
> Ooh, one of my favorite peeves as well. See, when AAP runs a command, it
> goes:
> 
> 
> Aap: <the big long compile command>
> 26 pages of error messages from the compile command
> Aap: command failed for <the big long compile command>
> 
> 
> It's often hard to spot _that_ there's an error exit (no, seriously: I
> don't grep for "failed" in the output) because the AAP message at the end
> looks so much like, say, a successful compilation step with no output.
> See, the successful compilation would be
> 
> Aap: <the big long compile command>
> 
> with no output. Certainly if the command is 8 lines long, it's hard to
> spot the "command failed".
> 
> 
> It would be nice if the on-failure notices was something like "*** AAP:
> Compile failed for $target" instead, possibly with the offending command
> printed just above it. That makes it easier to recognize.
> 
> Printing the command line a second time can cause useful erro messages to
> scroll off the screen, which might be a second reason _not_ to print the
> offending command.

The command is not always printed when it's executed.  It's not so easy
to find out when it was and when it wasn't.  A {quiet} attribute on the
command can be used.  But the command may consists of several lines.
And $MESSAGE may lack "system", that also prevents the message to be
printed.

Perhaps the system commands should return a flag that indicates whether
the command was already printed or not.  But that is relatively
complicated.

Well, the command should always be in the log file.  Thus if we just
report that the command failed and it wasn't displayed yet, the user
will have to look it up in the log.

-- 
Error:015 - Unable to exit Windows.  Try the door.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.