⛄Snowberb⛄ – 10-12 May 18
Why doesnt the
try catch finally
of this code respect the awaits
, but if it is inside the (async () => {})()
it does? I dont understand the syntax here
8 Replies
The above doesnt work, but this does:
Because you don't catch unawaited async functions
would work if IIFE throws something, you'd need another try catch inside of function to catch calls inside of it, obviously
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
didnt understand
first piece of code you sent can be simplified to
you don't await async function so if it throws you don't catch anything
oh
and it won't recursively catch anything within that function as well
This thread hasn’t had any activity in 36 hours, so it’s now locked.
Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1108698568488927243