Exception Handling JS

Run Settings
LanguageJavaScript
Language Version
Run Command
function someFunc(throwError) { try { console.log('try... acquire resources') if (throwError) throw new Error('Something went wrong') else return { result: 'Some result' } } finally { console.log('finally... cleanup resources') } } try { const res = someFunc(true) console.log(res) } catch (ex) { console.error('Catching error outside of someFunc\n', ex) }
Editor Settings
Theme
Key bindings
Full width
Lines