local result = _exceptions:tryCatch(function(exceptionCatcher) exceptionCatcher:tryRunning(function() _console:log("tryRunning执行了1") _exceptions:throwException(function(eb) eb:setMessage("xxx") end) _console:log("不会执行到这里") return "没有异常" end) exceptionCatcher:catchException(function(it) _console:log("catchException执行了") return "出现异常" .. it:getMessage() end) exceptionCatcher:finallyRun(function() _console:log("finally run 1...") end) end) _console:log("result", result) result = _exceptions:tryCatch(function(exceptionCatcher) exceptionCatcher:tryRunning(function() _console:log("tryRunning执行了2") return "没有异常" end) exceptionCatcher:catchException(function(it) _console:log("不会执行到这里") return "出现异常" .. it:getMessage() end) exceptionCatcher:finallyRun(function() _console:log("finally run 2...") end) end) _console:log("result", result)