기본문법 try catch finally
페이지 정보

본문
//초기 실행문
try{
if(조건) throw "사용자 정의 에러문.. ";
else {
alert("fadsfadsf"); //실행문 예시;
//실행문에서 에러시 자동예외문으로 넘어감.
}
}
//예외문 캐치
catch(e){ //e:exception을 의미
//number(오류 번호) name(오류 명칭) onerror 이벤트 try...catch...(오류 처리)
//message(오류 메시지) description(오류 설명) Jscript 오류코드 throw(오류 처리)
}
//오류검증 후 처리문
finally{
}
- 이전글모바일, PC 체크 19.03.14
- 다음글location.href, location.pathname.toLowerCase() 18.12.08
댓글목록
등록된 댓글이 없습니다.

