js throw custom error try catch code example Example: try catch error try { console.log('hello'); } catch (e){ }