Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
锘縰sing System;
using System.Collections.Generic;
using Dynamo.Graph.Nodes;
using ProtoCore.AST.AssociativeAST;
using NodeModelsEssentials.Functions;
using System.Linq;
using Newtonsoft.Json;
namespace NodeModelsEssentials
// <summary>
// Sample Node Model called MultiplyMulti.
// It returns the product of two numbers and a verbose string.
// </summary>
[NodeDescription("Throw a custom warning when something fails.")]
[InPortDescriptions("A string.")]
"Resulting string.")]
public class Error : NodeModel
private Error(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts) : base(inPorts, outPorts)
public Error()
public override IEnumerable<AssociativeNode> BuildOutputAst(List<AssociativeNode> inputAsNodes)
if (!InPorts[0].Connectors.Any())
return new[] {
AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode())
var errorFunctionNode =
new Func<string, string>(NodeModelsEssentialsFunctions.Error),
new List<AssociativeNode> { inputAsNodes[0] });
return new[] {
AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), errorFunctionNode)