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.

Note, the bsErrorModal function requires the Bootstrap 4+ JavaScript library. This library can be downloaded or referenced via CDN from https://www.bootstrapcdn.com.

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

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

Last updated