Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

catch errors async await javascript

try {
  await fetchUserData(userId)
} catch (e) {
  console.log('asynchronous error was caught!');
  handleError(e);
}
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #catch #errors #async #await #javascript
ADD COMMENT
Topic
Name
3+2 =