...

/

Catching Asynchronous Exceptions

Catching Asynchronous Exceptions

This lesson describes how to handle asynchronous code exceptions.

Asynchronous code

An asynchronous exception occurs when an asynchronous code throws an exception. Asynchronous code is often associated with the concept of Promise that is defined in the next section. In TypeScript (as well as JavaScript), asynchronous code is a piece of code that executes aside from the main thread of execution. The goal is to have a task running while another task is executed. For example, you can click buttons and write inside inputs while a response to a server is fetching information.

Promises

A ...