Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 foo() { | 5 foo() { |
| 6 try { | 6 try { |
| 7 throw "hi there"; | 7 throw "hi there"; |
| 8 } on String catch (e, t) { | 8 } on String catch (e, t) { |
| 9 } catch (e, t) { | 9 } catch (e, t) { |
| 10 rethrow; | 10 rethrow; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 | 31 |
| 32 qux() { | 32 qux() { |
| 33 try { | 33 try { |
| 34 throw "on only"; | 34 throw "on only"; |
| 35 } on String catch (e, t) { | 35 } on String catch (e, t) { |
| 36 // unreachable | 36 // unreachable |
| 37 rethrow; | 37 rethrow; |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 wub() { | |
| 42 try { | |
| 43 throw "on without type"; | |
|
Jennifer Messerly
2015/04/10 20:32:33
"on without exception parameter" ?
vsm
2015/04/10 20:41:35
Done.
| |
| 44 } on String { | |
| 45 } | |
| 46 } | |
| 47 | |
| 41 main() { | 48 main() { |
| 42 foo(); | 49 foo(); |
| 43 bar(); | 50 bar(); |
| 44 baz(); | 51 baz(); |
| 45 qux(); | 52 qux(); |
| 53 wub(); | |
| 46 } | 54 } |
| OLD | NEW |