Skip to content

Commit

Permalink
Test commit to see the text line that causes the exception to be raised.
Browse files Browse the repository at this point in the history
  • Loading branch information
n.bitounis committed Nov 25, 2019
1 parent 4bb681b commit 54e0155
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions DataStructures/Common/PrimesList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,16 @@ private static void _initializeData()

if (numbersAsStrings.Count > 0)
{
// cast them into integers and add them to the primes list
var numbers = numbersAsStrings.Select(item => Convert.ToInt32(item)).ToList<int>();
_primes.AddRange(numbers);
try
{
// cast them into integers and add them to the primes list
var numbers = numbersAsStrings.Select(item => Convert.ToInt32(item)).ToList<int>();
_primes.AddRange(numbers);
}
catch (Exception e)
{
throw new Exception(line, e);
}
}
}
}
Expand Down Expand Up @@ -225,7 +232,5 @@ private static string[] _readResource(string resourceName)
throw new Exception($"Failed to read resource {resourceName}", ex);
}
}

}

}
}

0 comments on commit 54e0155

Please sign in to comment.