OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 // VMOptions=--causal_async_stacks |
| 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
| 8 baz() async { |
| 9 throw "Bad!"; |
| 10 } |
| 11 |
| 12 bar() async { |
| 13 await baz(); |
| 14 } |
| 15 |
| 16 foo() async { |
| 17 await bar(); |
| 18 } |
| 19 |
| 20 main() async { |
| 21 try { |
| 22 await foo(); |
| 23 } catch (e, st) { |
| 24 Expect.isTrue(st.toString().contains("baz")); |
| 25 Expect.isTrue(st.toString().contains("bar")); |
| 26 Expect.isTrue(st.toString().contains("foo")); |
| 27 Expect.isTrue(st.toString().contains("main")); |
| 28 } |
| 29 } |
OLD | NEW |