# throw

throw error.

## Syntax

* throw(MException)

## Input argument

* MException - MException object

## Description

**throw(MException)** throws an exception based on the information contained in the **MException** object, exception.

## Example

```matlab
ME = MException('nelson:errorId', 'my error')
throw(ME)
```

## See also

[MException](mexception), [rethrow](rethrow), [throwAsCaller](throwascaller).

## History

| Version | Description     |
| ------- | --------------- |
| 1.0.0   | initial version |

## Author

Allan CORNET
