Chapter 6. The error reporting API
Prev |  | Next

## Chapter 6. The error reporting API

The error reporting API is very simple. A plugin that wishes to use it must do these three things:

- Specify that it requires the ErrorList plugin.

- Register an "error source" at some stage, usually during startup.

- Add errors to the error source when they occur.

The ErrorList plugin handles the rest (displaying errors in a list, error highlighting, and so on) automatically.

### Note

All error list classes mentioned in this chapter are contained in the `errorlist` package. So you should add an import statement like the following to the start of your plugin's source file(s):

    import errorlist.*;

Prev |  | Next
Chapter 5. Additional commands | Home | Specifying dependencies