Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
async function email(address) {
try {
// Do something asynchronous that may throw...
await sendEmail({ to: address, from: '', subject: 'Hello' });
} catch(err) {
if (err instanceof SomeCustomError) {
} else {
throw err
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment