Avatar
@swift-5.7.3 enum HogeError: Error { case hoge } func nonThrowing(_ body: @autoclosure () throws -> Void) { try? body() } func rethrowing(_ body: () throws -> Void) rethrows { try body() } func fail() throws { throw HogeError.hoge } func foo() { nonThrowing(try fail()) } func bar() { rethrowing { nonThrowing(try fail()) } }