Index: corelib/src/exceptions.dart |
diff --git a/corelib/src/exceptions.dart b/corelib/src/exceptions.dart |
index 3e95797999cb3a90cce1e2ea8a3e4cd1c8b00e35..ddb3042e9e8423311c2cff8cf967a9f520e26435 100644 |
--- a/corelib/src/exceptions.dart |
+++ b/corelib/src/exceptions.dart |
@@ -38,7 +38,7 @@ class NoSuchMethodException implements Exception { |
const NoSuchMethodException(Object this._receiver, |
String this._functionName, |
List this._arguments, |
- [List existingArgumentNames = null]) : |
+ [List existingArgumentNames = null]) : |
this._existingArgumentNames = existingArgumentNames; |
floitsch
2012/06/25 18:21:09
not your code, but 80chars.
Lasse Reichstein Nielsen
2012/06/26 08:26:03
Done.
|
String toString() { |
@@ -140,6 +140,22 @@ class NullPointerException implements Exception { |
} |
+class CastException implements Exception { |
+ // TODO(lrn): Change actualType and expectedType to "Type" when reified |
+ // types are available. |
+ final Object actualType; |
+ final Object expectedType; |
+ |
+ CastException(this.actualType, this.expectedType); |
+ String toString() { |
+ return "$exceptionName: Casting value of type $actualType to" |
+ " incompatible type $expectedType"; |
+ } |
+ |
+ String get exceptionName() => "CastException"; |
+} |
+ |
+ |
class NoMoreElementsException implements Exception { |
const NoMoreElementsException(); |
String toString() => "NoMoreElementsException"; |