Index: third_party/bigint/BigUnsigned.hh |
diff --git a/third_party/bigint/BigUnsigned.hh b/third_party/bigint/BigUnsigned.hh |
index accd4d67821ec90d2067f433c7cbf3782a712f02..de4c18e066c82d6a77a04f5bf23f888d7490e362 100644 |
--- a/third_party/bigint/BigUnsigned.hh |
+++ b/third_party/bigint/BigUnsigned.hh |
@@ -267,11 +267,7 @@ inline BigUnsigned BigUnsigned::operator *(const BigUnsigned &x) const { |
} |
inline BigUnsigned BigUnsigned::operator /(const BigUnsigned &x) const { |
if (x.isZero()) |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned::operator /: division by zero"; |
-#endif |
BigUnsigned q, r; |
r = *this; |
r.divideWithRemainder(x, q); |
@@ -279,11 +275,7 @@ inline BigUnsigned BigUnsigned::operator /(const BigUnsigned &x) const { |
} |
inline BigUnsigned BigUnsigned::operator %(const BigUnsigned &x) const { |
if (x.isZero()) |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned::operator %: division by zero"; |
-#endif |
BigUnsigned q, r; |
r = *this; |
r.divideWithRemainder(x, q); |
@@ -326,11 +318,7 @@ inline void BigUnsigned::operator *=(const BigUnsigned &x) { |
} |
inline void BigUnsigned::operator /=(const BigUnsigned &x) { |
if (x.isZero()) |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned::operator /=: division by zero"; |
-#endif |
/* The following technique is slightly faster than copying *this first |
* when x is large. */ |
BigUnsigned q; |
@@ -340,11 +328,7 @@ inline void BigUnsigned::operator /=(const BigUnsigned &x) { |
} |
inline void BigUnsigned::operator %=(const BigUnsigned &x) { |
if (x.isZero()) |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned::operator %=: division by zero"; |
-#endif |
BigUnsigned q; |
// Mods *this by x. Don't care about quotient left in q. |
divideWithRemainder(x, q); |
@@ -398,12 +382,7 @@ void BigUnsigned::initFromPrimitive(X x) { |
template <class X> |
void BigUnsigned::initFromSignedPrimitive(X x) { |
if (x < 0) |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned constructor: " |
- "Cannot construct a BigUnsigned from a negative number"; |
-#endif |
else |
initFromPrimitive(x); |
} |
@@ -427,12 +406,7 @@ X BigUnsigned::convertToPrimitive() const { |
return x; |
// Otherwise fall through. |
} |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned::to<Primitive>: " |
- "Value is too big to fit in the requested type"; |
-#endif |
} |
/* Wrap the above in an x >= 0 test to make sure we got a nonnegative result, |
@@ -445,12 +419,7 @@ X BigUnsigned::convertToSignedPrimitive() const { |
if (x >= 0) |
return x; |
else |
-#ifdef FOXIT_CHROME_BUILD |
abort(); |
-#else |
- throw "BigUnsigned::to(Primitive): " |
- "Value is too big to fit in the requested type"; |
-#endif |
} |
#endif |