# catch Block

*noun*

say it: **“KACH blok”** **/kætʃ blɑk/**

The part after a try block, written catch (error) { }, that runs only when code in the try block throws an error, and receives that error.

## What is **catch Block** in JavaScript?

**catch Block** — A block that handles a matching exception from its try block.

```javascript
function reserve(seats) {
    if (seats < 1) {
        throw new Error("Seat count must be positive");
    }
}
```

## In a sentence

- “The **catch block** showed Sorry, that recipe file is damaged, instead of letting the program crash.”
- “The **catch block** showed "We couldn't load the menu. Try again?" instead of a blank page.”
- “I logged error.message in the **catch block** to see why the order failed.”

Level: Journeyman · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=3)

Updated: November 9, 2026

## In other subjects

- [catch Block in C#](https://www.ask-codey.com/glossary/catch-block-c-sharp)
- [catch Block in Java](https://www.ask-codey.com/glossary/catch-block)

Source: https://www.ask-codey.com/glossary/catch-block-javascript
