On Monday 13 Jul 2009 10:43:46 Chapa wrote:
> Hi Adam,
>
> Can you explain more detail the way of your decision. I have the log
> file after building. How can I get the error and name of the module?
> Thanks.
>
> On Jul 12, 2:51 am, Adam Burton <[email protected]> wrote:
> > On Thursday 09 Jul 2009 12:45:04 Chapa wrote:> Hi all.
> >
> > > We still have many VB6 modules compiling with the NAnt tool. When some
> > > of them is broken in the e-mail (in errors section) we just have the
> > > next message:
> > > "External Program Failed: C:\Programme\Microsoft Visual Studio
> > > \VB98\VB6.EXE (return code was 1)".
> > > But it will be great to know which module is broken exactcly. Is it
> > > possible?
> > > Can anybody help? I will be glad to any advices.
> > >
> > > P.S. My english is not very well but I hope my problem is clear :)
> >
> > Output the VB6 build to a log file, then at the end of your VB6 builds or
> > on failures (I am thinking trycatch) look through the file for errors and
> > you can output those details with an error echo then fail the build once
> > you've completed looking through the fail (or not if you found none).
> > That is essentially how I do it. That way I get class name, line numbers
> > and failure reason in the ccnet log.
The module should be included in the error message (well it will give the
filename) along with a line number. I don't have the code in front of me now
(but it is not written in NAnt, it is actually a custom nant task that
basically produces some temporary project files for us with the dependencies
fixed) but I shall look when I get into work tomorrow. I think I just loop
through the log files contents and if the line has Error or Warning in it I
just echo the line with error or warning set, then for error I also set a flag
so that after looping through the log file I know to throw an exception (or for
a nant scripts case I would call <fail/>).