diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2011-09-10 11:25:54 +0200 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2011-09-10 11:25:54 +0200 |
commit | f920539cfcaf32813d390bfa501a08ea8bf8ec89 (patch) | |
tree | 1b8d1d57e9b38d43d01c28521c2e34aff743adb5 /src/engine/SCons/Subst.xml | |
parent | f9b265b27769aff6cff204cea5402d69ead3dda0 (diff) | |
parent | ba4425ab5227fd9597fccd368bffff6bf1032149 (diff) |
Merge commit 'upstream/2.1.0'
Diffstat (limited to 'src/engine/SCons/Subst.xml')
-rw-r--r-- | src/engine/SCons/Subst.xml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/engine/SCons/Subst.xml b/src/engine/SCons/Subst.xml new file mode 100644 index 0000000..debc8c3 --- /dev/null +++ b/src/engine/SCons/Subst.xml @@ -0,0 +1,46 @@ +<!-- +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation + +This file is processed by the bin/SConsDoc.py module. +See its __doc__ string for a discussion of the format. +--> + +<scons_function name="AllowSubstExceptions"> +<arguments signature="global"> +([exception, ...]) +</arguments> +<summary> +Specifies the exceptions that will be allowed +when expanding construction variables. +By default, +any construction variable expansions that generate a +<literal>NameError</literal> +or +<literal>IndexError</literal> +exception will expand to a +<literal>''</literal> +(a null string) and not cause scons to fail. +All exceptions not in the specified list +will generate an error message +and terminate processing. + +If +&f-AllowSubstExceptions; +is called multiple times, +each call completely overwrites the previous list +of allowed exceptions. + +Example: + +<example> +# Requires that all construction variable names exist. +# (You may wish to do this if you want to enforce strictly +# that all construction variables must be defined before use.) +AllowSubstExceptions() + +# Also allow a string containing a zero-division expansion +# like '${1 / 0}' to evalute to ''. +AllowSubstExceptions(IndexError, NameError, ZeroDivisionError) +</example> +</summary> +</scons_function> |