본문 바로가기 메뉴 바로가기

coding backup

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

coding backup

검색하기 폼
  • 분류 전체보기 (136)
    • TIL (57)
    • 도서 및 강의 (21)
      • 이것이 자바다 (17)
      • 혼자 공부하는 네트워크 (4)
    • DB&SQL (3)
    • 코딩테스트 (51)
  • 방명록

전체 글 (136)
07월 26일: Errors thrown from here are not handled because the enclosing catch is not exhaustive

에러Errors thrown from here are not handled because the enclosing catch is not exhaustive 에러 원인do-catch 구문에서 catch 블록이 모든 가능한 에러를 처리하지 않을 때 발생  에러 해결enum에 있는 모든 케이스를 다 해줬는데도 not exhaustive 에러가 떠서 뭐지? 했는데 어떤 에러가 throw 될지 모르기 때문에 디폴트 값을 하나 설정해줘야 한다는 것이었다. // 2개의 에러를 설정해둔 상태enum UserInfoError: Error { case idIsEmpty case isMissMatch}func start() { do { try checkUserId() } catch Use..

TIL 2023. 7. 26. 12:05
이전 1 ··· 124 125 126 127 128 129 130 ··· 136 다음
이전 다음
최근에 올라온 글

Blog is powered by Tistory / Designed by Tistory

티스토리툴바