> For the complete documentation index, see [llms.txt](https://mind-expression-docs.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mind-expression-docs.gitbook.io/home/how-to-guides/intelligent-process/package-kernel-exceptions.md).

# Package: Kernel Exceptions

## Class: Error

### Introduction

**Environment: `container`**

This is the main class used to implement the exception handling system (EHS).

It plays two distinct roles:

* that of the exception,
* and that of the exception handler.

You can signal an error with a message as the following:

```smalltalk
Error signal: 'This is an error'.
```

And catch and handle an error like this:

```smalltalk
[ Error signal: 'This is an error' ] onErrorDo: [ :err | 
 Console print: 'error:' , err ].
```

### Class Method

#### Category: instance creation

* **`signal`** - Ask ContextHandlers in the sender chain to handle this signal.
* **`signal:`** - Ask ContextHandlers in the sender chain to handle this signal with a specified textual description.
