Last active
June 27, 2025 14:02
-
-
Save nero-angela/1f1e1a16f764ec917aca662cdaa7b99a to your computer and use it in GitHub Desktop.
dartTutorialTryOnCatch2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Copyright 2022. ⓒ DevStory.co.kr All rights reserved. | |
void main() { | |
try { | |
print("1. start"); | |
assert(false); // AssertionError 발생 | |
print("2. finish"); // 에러가 없는 경우 실행 | |
} on UnsupportedError catch (e) { | |
print("3. UnsupportedError 에러 : ${e.runtimeType}"); // UnsupportedError 담당 | |
} catch (e) { | |
print("4. 기타 에러 : ${e.runtimeType}"); // 기타 에러 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment