Changeset 17250 for branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval
- Timestamp:
- 09/13/19 10:02:57 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraintsParser.cs
r17146 r17250 47 47 if (match.Success) { 48 48 if (match.Groups.Count != 10) { 49 throw new ArgumentException("The target-constraint is not complete." );49 throw new ArgumentException("The target-constraint is not complete.", line); 50 50 } else { 51 51 var targetVariable = match.Groups[1].Value.Trim(); … … 55 55 56 56 if (targetVariable != target) { 57 throw new ArgumentException($"The target variable {targetVariable} does not match the provided target {target}." );57 throw new ArgumentException($"The target variable {targetVariable} does not match the provided target {target}.", line); 58 58 } 59 59 … … 74 74 } 75 75 } else { 76 throw new ArgumentException("The inserted target constraint is not valid." );76 throw new ArgumentException("The inserted target constraint is not valid.", line); 77 77 } 78 78 //Check for derivation … … 83 83 if (match.Success) { 84 84 if (match.Groups.Count != 17) { 85 throw new ArgumentException("The given derivation-constraint is not complete." );85 throw new ArgumentException("The given derivation-constraint is not complete.", line); 86 86 } else { 87 87 var derivationTarget = match.Groups[3].Value.Trim(); … … 96 96 97 97 if (derivationTarget != target) { 98 throw new ArgumentException($"The target variable {derivationTarget} does not match the provided target {target}." );98 throw new ArgumentException($"The target variable {derivationTarget} does not match the provided target {target}.", line); 99 99 } 100 100 101 101 if (variables.All(v => v != derivationVariable)) { 102 throw new ArgumentException($"The given variable {derivationVariable} does not exist in the dataset." );102 throw new ArgumentException($"The given variable {derivationVariable} does not exist in the dataset.", line); 103 103 } 104 104 105 105 if (match.Groups[2].Value.Trim() != "" || match.Groups[11].Value.Trim() != "") { 106 106 if (match.Groups[2].Value.Trim() == "" || match.Groups[11].Value.Trim() == "") 107 throw new ArgumentException("Number of derivation has to be written on both sides." );107 throw new ArgumentException("Number of derivation has to be written on both sides.", line); 108 108 if (match.Groups[2].Value.Trim() != match.Groups[11].Value.Trim()) 109 throw new ArgumentException("Derivation number is not equal on both sides." );109 throw new ArgumentException("Derivation number is not equal on both sides.", line); 110 110 } 111 111 … … 126 126 } 127 127 } else { 128 throw new ArgumentException("The inserted derivation constraint is not valid." );128 throw new ArgumentException("The inserted derivation constraint is not valid.", line); 129 129 } 130 130 //Check for comment … … 133 133 continue; 134 134 } else { 135 throw new ArgumentException("Error at your constraints definition constraints have to start with (Target: | d | \u2202 | #)" );135 throw new ArgumentException("Error at your constraints definition constraints have to start with (Target: | d | \u2202 | #)", line); 136 136 } 137 137 }
Note: See TracChangeset
for help on using the changeset viewer.