Index: sdk/lib/core/exceptions.dart |
diff --git a/sdk/lib/core/exceptions.dart b/sdk/lib/core/exceptions.dart |
index ed16cf6c642c2c18ae2d1e9dc69dcd0d9708a8a9..61f3f89def79b09ac9016b15ec8100704051971a 100644 |
--- a/sdk/lib/core/exceptions.dart |
+++ b/sdk/lib/core/exceptions.dart |
@@ -40,6 +40,25 @@ class FormatException implements Exception { |
} |
+class NullPointerException implements Exception { |
+ const NullPointerException([this.functionName, this.arguments = const []]); |
+ String toString() { |
+ if (functionName == null) { |
+ return exceptionName; |
+ } else { |
+ return "$exceptionName : method: '$functionName'\n" |
+ "Receiver: null\n" |
+ "Arguments: $arguments"; |
+ } |
+ } |
+ |
+ String get exceptionName => "NullPointerException"; |
+ |
+ final String functionName; |
+ final List arguments; |
+} |
+ |
+ |
class IllegalJSRegExpException implements Exception { |
const IllegalJSRegExpException(String this._pattern, String this._errmsg); |
String toString() => "IllegalJSRegExpException: '$_pattern' '$_errmsg'"; |