[Dart] 에러 핸들링
Updated:
예제
- 코드
-
void main() { try { print(1); throw Exception('message'); print(2); } catch (e) { print(e); } finally { print(3); } }
-
- 실행 결과
-
1 Exception: message 3
-
Updated:
void main() {
try {
print(1);
throw Exception('message');
print(2);
} catch (e) {
print(e);
} finally {
print(3);
}
}
1
Exception: message
3