Re: Misleading error messages

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Lars Ivar Igesund wrote:

> > Sorry, I don't understand this.  Can you give an example?
> 
> Ok, I made a simple .d file with a simple syntactical error and
> an equally simple .aap file.
> 
> The compiler error message follows directly after the command.
> Then comes 5-6 lines with the recipe where the error was. This
> might be okay in the project recipes, but I don't think they should
> be there for the modules. Maybe tested and included modules
> should be 'registered' such that these messages don't show up?
> 
> 
> C:\projects\code\foo>aap
> Aap: dmd   -O    -ofbuild-nt\bar.obj -c bar.d
> bar.d(9): identifier 'foo' is not defined
> 
> Aap: Error in recipe "c:/projects/code/myaap/exec/modules/d.aap" line 124:
> Error
>  executing commands for compile d: Error in recipe
> "c:/projects/code/myaap/exec/
> modules/d.aap" line 58: Error executing commands for d_compile d: Error in
> recip
> e "c:/projects/code/myaap/exec/modules/d.aap" line 41: Error executing
> commands
> for compile_dmd d: Error in recipe "compile_dmd d action" line 8: Shell
> returned
>  1 when executing:
> dmd   -O    -ofbuild-nt\bar.obj -c bar.d

I understand what you are saying now.

If the error message is about something wrong in the source file it is
indeed quite a lot of text that you don't need.  However, it is also
possible that the shell command had an error (e.g., wrong argument).  In
that case the messages are useful to find out how Aap decided what
command to execute.  Unfortunately, Aap cannot know which of the two
situations is relevant.

I think it's better to give a bit too much info than to little.  It
would be possible to put some things only in the log file, but since
this is a real error message it would not be good if it goes unnoticed.
After all, this message only occurs when building failed.

-- 
MAN:     You don't frighten us, English pig-dog!  Go and boil your bottoms,
         son of a silly person.  I blow my nose on you, so-called Arthur-king,
         you and your silly English K...kaniggets.
   He puts hands to his ears and blows a raspberry.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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.