PDA

View Full Version : Missing macro error recovery


pjaquiery
04-27-2004, 05:28 PM
Two issues:

if a macro is referenced in the Project Steps, but has not been defined, build fail processing happens but the FAILSTEP_NAME and FAILSTEP_OUTPUT macros are blank.

if a macro is referenced in the Failure Steps, but has not been defined, the build stops and the failure processing is not completed.

The big problem is in the failure step processing because often that is reporting the failure (generally by email for us). A fix would be for VBP to treat all undefined macros in failure step processing as defined but blank. That would generally allow the processing to complete at least.

kinook
04-28-2004, 08:32 AM
if a macro is referenced in the Project Steps, but has not been defined, build fail processing happens but the FAILSTEP_NAME and FAILSTEP_OUTPUT macros are blank.

Good catch. Apparently not too common since it looks like it's always worked this way and you're the first to notice. We'll add it to the fix list.

if a macro is referenced in the Failure Steps, but has not been defined, the build stops and the failure processing is not completed...A fix would be for VBP to treat all undefined macros in failure step processing as defined but blank.

Even that wouldn't help much if the To, Server, or other critical fields of the Send Mail action had the undefined macros. You could put the Send Mail step first (or mark all prior failure steps to ignore failure) and hard-code the Send Mail step properties to known good values. Of course, even that can't guard against things like the mail server being down or unavailable. As a backup you could do a NET SEND if the Send Mail step fails.

pjaquiery
04-28-2004, 03:38 PM
Originally posted by kinook
Apparently not too common since it looks like it's always worked this way and you're the first to notice.

I've noticed it before from time to time but it didn't bug me enough to do anything.


Even that wouldn't help much if the To, Server, or other critical fields of the Send Mail action had the undefined macros. ...

Yes to all of that, but the chances are better if a blank is used, particuarly as I tend to copy mail steps and just change the message.