Skip to content
jayoon edited this page Nov 29, 2022 · 4 revisions

Repetition and Exceptions

try and catch, throw try문에서 예외처리로 throw를 하면 해당 조건에 부합하는 catch로 잡는다. 부합하는 catch가 없다면 비정상 종료한다. catch(...)는 switch statement의 default와 동일한 역할을 한다.

인강 section

13: 예외(exception)

try & catch

에러 코드보다 예외가 더 낫다?

Clone this wiki locally