# do-try-catch
총 1개의 포스트

[SwiftUI] .task()에서 throwing function 사용 시 오류
Invalid conversion from throwing function of type '@Sendable () async throws -> Void' to non-throwing function type '@Sendable () async -> Void’ 문제 상황 async throws를 사용한 함수를 .task() 안에 사용하려고 했다. 해결 과정 처음에는 .task() 안에 do-try-catch문을 사용하면 안되는건가 싶어서 .task() 대신에 .onAppear() 안에 넣어 봤다. > Invalid conversion from 'async' function of type '() async throws -> Void' to synchronous funct
2023년 2월 4일
·
0개의 댓글·
0