Error handling
Last updated
Last updated
try {
// do something
}
catch (err) {
// catch the error
}throw 'error'throw null
throw true
throw 123try {
null() // attempt to call null
} catch (e) {
puts e
}{
message: 'Appempt to call a null value.',
stack: 'in main.no (2:9)'
}