인프런 커뮤니티 질문&답변
Exception 의 Scope는 어떻게되나요?
해결된 질문
작성
·
265
3
throw Exception(); 을 호출시
catch받는 쪽에서 reference로 받는데 생성된 Exception은 임시 객체 로 취급하지않는건가요? 아니면
Exception은 로컬변수로 취급을 안하는 건가요?
Exception 객체의 duration 이 궁금합니다.
답변 1
5
홍정모
지식공유자
저도 궁금해서 찾아봤습니다. 아래 링크가 같은 질문인 것 같네요.
The exception object's scope is outside of the scope of the block where the throw occurs
https://stackoverflow.com/questions/1654150/scope-of-exception-object-in-c





