Advertisement
Guest User

Untitled

a guest
May 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. async function b () {
  2. console.log('done with func b');
  3. }
  4.  
  5. async function a() {
  6. try {
  7. throw 'this is the return message'
  8. } catch (e) {
  9. return e;
  10. } finally {
  11. await b();
  12. }
  13. }
  14.  
  15. a().then(msg => {
  16. console.log('done with func a');
  17. console.log("return Msg:",msg)
  18. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement