JSFiddle - React, Tailwind, and code Playground

by Richard Hunter

JavaScript

try {
 
    setTimeout(function () {
        
        throw {
            name : "myError"    
        }
    
   }, 2000);
    
} catch(error) {
    console.log("error occurred", error.name);    
    
}