# errordlg

Creates a error dialog box.

## Syntax

* h = errordlg()
* h = errordlg(text\_error)
* h = errordlg(text\_error, title)
* h = errordlg(text\_error, title, mode)

## Input argument

* text\_error - a string or a cell of string: the error message.
* title - a string: the title of the dialog box.
* mode - a string: 'mode', 'non-modal', 'replace'.

## Output argument

* h - a QObject handle.

## Description

**errordlg** creates an error dialog box.

**h = errordlg(text\_error, title, 'replace')** specifies whether to replace an existing dialog box having the same title.

![](https://160667757-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPvJ6mJve3gz5MU4d1%2F-LdPvK9haEDKz9dfjFOh%2F-LdPvraFGBDLd-UeO8fg%2Ferrordlg_1_E21703F7.png?generation=1556303806651375\&alt=media)

## Examples

```matlab
h = errordlg()
```

```matlab
h = errordlg('error string')
```

```matlab
h = errordlg('error string', 'dialog title')
```

```matlab
h = errordlg('error string', 'dialog title')
h = errordlg('error string', 'dialog title', 'on')
```

## See also

[warndlg](warndlg), [questdlg](questdlg), [helpdlg](helpdlg), [msgbox](msgbox).

## History

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

## Author

Allan CORNET
