BuildCompletedEventArgs


This class holds the parameters when a build completes.

[Type]

class BuildCompletedEventArgs:
        Error = None
        Cancelled = False
        HasBuildError = False
        HasBuildWarning = False

[Variable]

Variable

Description

Error

When an exception occurs in the build, this holds the error contents (System.Exception).

Cancelled

This holds whether the build execution was canceled or not.

HasBuildError

This holds whether an error occurred in the build or not.

HasBuildWarning

This holds whether a warning occurred in the build or not.

[Detailed description]

-

BreakCompletedEventArgs is a class, and it is passed as the argument only when the build.BuildCompleted event is issued.
It is not therefore possible to generate an instance of this class.

[Example of use]

>>>def buildCompleted(sender, e):
... print "Error = {0}".format(e.Error)
... print "BuildError = " + e.HasBuildError.ToString()
... print "BuildWarning = " + e.HasBuildWarning.ToString()
... print "BuildCancelled = " + e.Cancelled.ToString()
...
>>>build.BuildCompleted += buildCompleted   ... Event connection
>>>build.All(True)
Error = None
BuildError = False
BuildWarning = False
BuildCancelled = False
True
>>>                             ... When an exception occurs, displayed as follows
>>>build.All(True)
Error = System.Exception:An error occurred during build.(E0203001)
BuildError = False
BuildWarning = False
BuildCancelled = False
False
>>>
>>>                             ... When a build error occurs, displayed as follows
>>>build.All(True)
Error = None
BuildError = True
BuildWarning = False
BuildCancelled = False
False
>>>