Skip to content

Commit

Permalink
Merge pull request #7184 from WalterBright/bigintError
Browse files Browse the repository at this point in the history
bigint.d: replace Error with assert()
merged-on-behalf-of: Nicholas Wilson <[email protected]>
  • Loading branch information
dlang-bot authored Sep 13, 2019
2 parents 897ff6e + b1638b1 commit f8196e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions std/bigint.d
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,7 @@ private:
// Generate a runtime error if division by zero occurs
void checkDivByZero() pure const nothrow @safe
{
if (isZero())
throw new Error("BigInt division by zero");
assert(!isZero(), "BigInt division by zero");
}
}

Expand Down

0 comments on commit f8196e6

Please sign in to comment.