# 13.04-錯誤訊息

Go 語言有一個內建型別可供錯誤訊息使用（`error`型別），我們可以使用 `errors` package 中的 `New` 函式建立自己的錯誤訊息：

```go
package main

import "errors"

func main() {
    err := errors.New("error message")
}
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://go.netdpi.net/13-the-core-packages/pkg_err.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
