[.NET]Throw

해내면 그만!XX·2022년 5월 16일
0

throw
: 프로그램 실행 중 예외 발생 신호를 보냅니다.

//enum ErrorCode의 상수를 문자열로 던져준다.
if (Info == null)
	throw new Exception(ErrorCode.NotExistsRequestInfo.ToString());
    
//문자열을 던져도된다.
throw new Exception("예외를 던집니다.");

참조
https://qzqz.tistory.com/222

0개의 댓글