Skip to content

Instantly share code, notes, and snippets.

@Bonemind
Created October 17, 2019 10:14
Show Gist options
  • Select an option

  • Save Bonemind/a455f45d8378f2bc03ae18af4dd56e2d to your computer and use it in GitHub Desktop.

Select an option

Save Bonemind/a455f45d8378f2bc03ae18af4dd56e2d to your computer and use it in GitHub Desktop.
async function thro(res, rej) {
return await new Promise((a,b) => { b('ajk') });
}
async function callthing2() {
try {
await new Promise(thro);
} catch(e) {
console.log('caught');
}
}
callthing2();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment