Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: sdk/lib/core/exceptions.dart

Issue 1209523002: Make modInv throw Exception on incompatible operands. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Merge to head, make tests run. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/core/exceptions.dart
diff --git a/sdk/lib/core/exceptions.dart b/sdk/lib/core/exceptions.dart
index 38af7af442ef00a858454ccb7a57d10be7891321..7484ed567dedb603eeccc30741a25abb37bd94a1 100644
--- a/sdk/lib/core/exceptions.dart
+++ b/sdk/lib/core/exceptions.dart
@@ -18,15 +18,15 @@ part of dart.core;
* until the actual exceptions used by a library are done.
*/
abstract class Exception {
- factory Exception([var message]) => new _ExceptionImplementation(message);
+ factory Exception([var message]) => new _Exception(message);
}
/** Default implementation of [Exception] which carries a message. */
-class _ExceptionImplementation implements Exception {
+class _Exception implements Exception {
final message;
- _ExceptionImplementation([this.message]);
+ _Exception([this.message]);
String toString() {
if (message == null) return "Exception";
@@ -174,6 +174,7 @@ class FormatException implements Exception {
}
}
+// Exception thrown when doing integer division with a zero divisor.
class IntegerDivisionByZeroException implements Exception {
const IntegerDivisionByZeroException();
String toString() => "IntegerDivisionByZeroException";

Powered by Google App Engine
This is Rietveld 408576698