//任何方法都可能抛出 Exception;//在自己的代码中,可以用 Nothing 标记永不返回的函数fun methodWithException(): Nothing { throw Exception("test exception")}//任何方法都可以抛出 RuntimeExceptionfun methodWithRuntimeException() { throw RuntimeException("test exception")}