---
title: exception
date: 2024-10-02T18:16:25Z
tags: []
---

1. throw

    ```javascript
    throw new Error('<Error message>')
    ```

    > The program will be terminated
    >
2. try

    ```javascript
    try{}
    catch(<error>){
        conlose.log(<error>.massage)
    }//error
    finally{}//always
    ```

3. debugger

    ```javascript
    debugger
    ```

    > Similar to a breakpoint, the program will pause here
    >

‍
