> For the complete documentation index, see [llms.txt](https://docs.wirebootstrap.com/bootstrap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wirebootstrap.com/bootstrap/modals/error.md).

# Error

Details from an exception thrown from either a data service or on the client can be displayed in a modal using the `wire.bsErrorModal` function.

{% hint style="info" %}
Note, the `bsErrorModal` function requires the Bootstrap 4+ JavaScript library.  This library can be downloaded or referenced via CDN from [https://www.bootstrapcdn.com](https://www.bootstrapcdn.com/).
{% endhint %}

The example below deliberately throws an exception and displays details of the exception by passing the exception object to the error modal.

```javascript
try {
    throw "This is an error";
}
catch(ex){
    wire.bsErrorModal(ex);
}
```
