Index: sdk/lib/isolate/isolate.dart |
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart |
index efc6ca252557a46969ddb6a3131c175ec2f29080..15ae1792e232346c07fdc54f3ccb2ea1d6a76229 100644 |
--- a/sdk/lib/isolate/isolate.dart |
+++ b/sdk/lib/isolate/isolate.dart |
@@ -26,6 +26,18 @@ class IsolateSpawnException implements Exception { |
final String _s; |
} |
+/** |
+ * Thrown when an isolate message is invalid. |
+ */ |
+class IsolateMessageException implements Exception { |
+ final String _message; |
+ |
+ // TODO(floitsch): give access to the message that couldn't be sent. |
Lasse Reichstein Nielsen
2013/12/11 10:38:28
Ah, agree :)
|
+ const IsolateMessageException(String this._message); |
+ |
+ String toString() => "IsolateMessageException: '$_message'"; |
+} |
+ |
class Isolate { |
final SendPort _controlPort; |
@@ -50,6 +62,8 @@ class Isolate { |
* |
* Returns a future that will complete with an [Isolate] instance if the |
* spawning succeeded. It will complete with an error otherwise. |
+ * |
+ * All errors are reported asynchronously through the returned future. |
Lasse Reichstein Nielsen
2013/12/11 10:38:28
Not necessarily all errors.
Let's specify which ar
floitsch
2013/12/11 12:14:16
Yes.
This should be changed to list all the possib
|
*/ |
external static Future<Isolate> spawn(void entryPoint(message), var message); |
@@ -71,6 +85,8 @@ class Isolate { |
* |
* Returns a future that will complete with an [Isolate] instance if the |
* spawning succeeded. It will complete with an error otherwise. |
+ * |
+ * All errors are reported asynchronously through the returned future. |
Lasse Reichstein Nielsen
2013/12/11 10:38:28
Ditto.
|
*/ |
external static Future<Isolate> spawnUri( |
Uri uri, List<String> args, var message); |