Try and catch

When an instruction might produce an error, a try and catch statement can define some custom error handling logic.

When a try-catch statement is executed, the instructions in the try block are executed in order. If any instruction produces an error, the catch block is executed with error as the first parameter.

Loading TypeScript...

Was this page helpful?