Changeset 13013 for branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/NumericalExpression.cs
- Timestamp:
- 10/15/15 16:39:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/NumericalExpression.cs
r13011 r13013 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 29 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {29 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 30 30 [StorableClass] 31 31 public class NumericalExpression : CodeNode { … … 56 56 var symbol = exprTree.Symbol; 57 57 if (!(symbol is Number || symbol is INumericalMethod || symbol is INumericalOperator)) 58 throw new System.Exception("NumericalExpression was given a child of type " + symbol.GetType() + 59 ". The expected child must be of type " + typeof(Number) 60 + " or " + typeof(INumericalMethod) 61 + " or " + typeof(INumericalOperator) + "."); 58 throw new InvalidProgramException("NumericalExpression was given a child of type " + symbol.GetType() + 59 ". The expected child must be of type Number or INumericalMethod or INumericalOperator ."); 62 60 63 61 return Prefix + ((CodeNode)symbol).Interpret(exprTree, exprTree.Subtrees) + Suffix;
Note: See TracChangeset
for help on using the changeset viewer.