| 1 |
// Copyright 2017 Caitlin Potter. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
author: Caitlin Potter <[email protected]> |
| 6 |
esid: pending |
| 7 |
description: > |
| 8 |
Implementations must defer rejecting an async function's Promise until after |
| 9 |
all finally blocks have been evaluated. |
| 10 |
flags: [async] |
| 11 |
---*/ |
| 12 |
|
| 13 |
var f = async() => { |
| 14 |
try { |
| 15 |
throw "early-throw"; |
| 16 |
} finally { |
| 17 |
throw "override"; |
| 18 |
} |
| 19 |
}; |
| 20 |
|
| 21 |
f().then($DONE, function(value) { |
| 22 |
assert.sameValue(value, "override", "Exception thrown in finally block"); |
| 23 |
}).then($DONE, $DONE); |