[Scons-users] SCons.Script.GetBuildFailures not reporting BuildError raised by pseudo-builder

Vrijnsen, Jeroen jeroen.vrijnsen at philips.com
Wed Feb 22 08:09:26 EST 2017


Hi,

I have a SConstruct that uses the atexit.register() hook to display some additional logging on build failure/success, using SCons.Script.GetBuildFailures().

I also have added a pseudo-builder using the env.AddMethod() function. This pseudo-builder should stop the build with a failure when something goes wrong. I have attempted to let the pseudo-builder raise a plain Exception, but also a SCons.Errors.BuildError exception; the build is nicely terminated, the error is displayed, however, the SCons.Script.GetBuildFailures() consists of an empty list.

How can I raise exceptions that are captured by the GetBuildFailures() method, because depending on the size of the failure list, I want to print 'build succeeded' or 'build failed'. Currently it just prints 'succeeded' even though exceptions have occurred.

Kind regards,
Jeroen

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170222/29811509/attachment.html>


More information about the Scons-users mailing list