how to handle sql exception in javascript code example Example: try catch error try { console.log('hello'); } catch (e){ }