D-Programming-Language/phobos — pull request #1731 by quickfur (2013-11-28 02:51:16+00:00)
Title: Fix issue 11600: to!BigInt(string) should validate input.

It's pretty hilarious to print the result of `to!BigInt("abracadabra")`, which is currently accepted by the `BigInt` code.

About the fix: I know the ddocs of `fromDecimalString` claims to return `false` upon invalid input, but this is not implemented, and I don't really like to change `biguintFromDecimal`'s function signature just so I can implement what the ddocs claim. So I'm opting to just throw when an invalid digit is found rather than go back to the bad ole C way of returning an error status that has to be checked by every function up the call stack. We have an exception system for a reason, after all.