Created
July 19, 2019 14:24
-
-
Save tearf001/c9c16a937f0e1ca257b53d1781be0895 to your computer and use it in GitHub Desktop.
exception-future
This file contains 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
import 'dart:async'; | |
main() { | |
Future.value(10).then((_) { | |
Future(() => throw 'err').catchError((_){ | |
print('innner $_'); | |
throw 'no catch'; | |
}); | |
return _; | |
}).then((_) { | |
print('outer $_'); | |
}).catchError((_) { | |
print('错误打印:$_'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment