dart (flutter) - 예외.

test() {
try {
throw OutOfLlamasException('Expected at least 1 section');
throw 'Out of llamas!';
} on OutOfLlamasException {
// A specific exception
buyMoreLlamas();
} on Exception catch (e) {
// Anything else that is an exception
print('Unknown exception: $e');
} catch (e) {
print('Error: $e'); // Handle the exception first.

} finally {
cleanLlamaStalls(); // Then clean up.

}
}

댓글

이 블로그의 인기 게시물

파이썬 vscode에서 자동 코드 정렬. Formatter.

Unity3D git 저장소에 올릴때 필요없는 파일 제외하기. gitignore

플러터(flutter) 개발 참고 사이트들.