| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library isolate_unhandled_exception_uri_helper; |
| 6 |
| 5 import 'dart:isolate'; | 7 import 'dart:isolate'; |
| 6 import 'dart:io'; | 8 import 'dart:io'; |
| 7 | 9 |
| 8 // Tests that isolate code in another script keeps message handling working | 10 // Tests that isolate code in another script keeps message handling working |
| 9 // after throwing an unhandled exception, if it has a function called | 11 // after throwing an unhandled exception, if it has a function called |
| 10 // unhandledExceptionCallback that returns true (continue handling). | 12 // unhandledExceptionCallback that returns true (continue handling). |
| 11 | 13 |
| 12 // Note: this test will hang if an uncaught exception isn't handled, | 14 // Note: this test will hang if an uncaught exception isn't handled, |
| 13 // either by an error in the callback or it returning false. | 15 // either by an error in the callback or it returning false. |
| 14 | 16 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 31 print('unhandled exception: ${future.exception}'); | 33 print('unhandled exception: ${future.exception}'); |
| 32 exit(1); | 34 exit(1); |
| 33 } | 35 } |
| 34 if (future.value != 'hello') { | 36 if (future.value != 'hello') { |
| 35 print('unexpected response: ${future.value}'); | 37 print('unexpected response: ${future.value}'); |
| 36 exit(1); | 38 exit(1); |
| 37 } | 39 } |
| 38 exit(0); | 40 exit(0); |
| 39 }); | 41 }); |
| 40 } | 42 } |
| OLD | NEW |