异常处理

//any function can throw an error
function functionWithException() {
    throw new Error("test exception")
}

functionWithException()