JSFiddle - React, Tailwind, and code Playground

by fairmutex

JavaScript

try{
    myFunction();
}
catch(e){
    alert(e);   
}


function myFunction(){
   throw 'myFunction has an error';
}