---
description: 🚧 施工中
---

# Error

[JS]() ⟩ error

{% hint style="success" %}
An <mark style="color:purple;">**Error**</mark> object has a <mark style="color:orange;">**name**</mark> property that specifies the <mark style="color:yellow;">**type of error**</mark> and a <mark style="color:orange;">**message**</mark> property.

```javascript
throw new Error('<error message here>')
```
{% endhint %}

{% tabs %}
{% tab title="🔴 主題" %}
* <mark style="color:orange;">**where**</mark>**&#x20;**<mark style="color:yellow;">**errors occur**</mark>
  * [syntax](err/syntax "mention") / [ref](err/ref "mention") / [type](err/type "mention")
* <mark style="color:orange;">**when**</mark>**&#x20;**<mark style="color:yellow;">**errors occur**</mark>
  * [runtime](err/runtime "mention") / [compile](err/compile "mention")
* <mark style="color:orange;">**what to do**</mark>**&#x20;**<mark style="color:yellow;">**with errors**</mark>
  * [handling](debug/handling "mention")
{% endtab %}

{% tab title="📘 手冊" %}
* [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) ⟩&#x20;
  * [ReferenceError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError)
{% endtab %}
{% endtabs %}
