DynamoDS/Dynamo — pull request #3024 by ke-yu (2014-11-10 07:35:26+00:00)
Title: Add protection to stop BuildAST from nodes being able to crash Dynamo

This pull request is to fix defect [MAGN 2580 Add protection to stop BuildAST from nodes being able to crash Dynamo] (http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-2580).

Based on the discussion in this defect, this pull request contains following code changes:
1. Add a new node state ``ElementState.AstBuiltBroken``.
2. Add a builtin function ``%nodeAstFailed(nodeName:string)`` which always returns null.
3. For any exception thrown out from ``NodeModel.BuiltOutputAst()``, the AST node for this UI node will be replaced with ``var_guid = %nodeAstFailed(nodeName)`` where ``nodeName`` is the full qualified name of this UI node, e.g., ``DynamoDummyNodes.DynamoDummyErrorNode``.
4. @elayabharath suggested the color scheme of ``AstBuiltBroken`` state could be the same as ``Error`` state. See below image:

![untitled](https://cloud.githubusercontent.com/assets/2600379/4972454/d1e2c0ea-68ab-11e4-8621-65c96da92bae.png)

5. Add a test project ``DynamoDummyNodes``, this project contains a UI node ``DynamoDummyErrorNode`` which will throw out an exception when it is compiled to AST (in ``BuiltOutputAst()``), this node is just for testing.

@lukechurch please review the change.
@Benglin it contains few UI changes, so please help to review the change as well if you are free :-).