Skip to content

Instantly share code, notes, and snippets.

@tearf001
Created July 19, 2019 14:24
Show Gist options
  • Save tearf001/c9c16a937f0e1ca257b53d1781be0895 to your computer and use it in GitHub Desktop.
Save tearf001/c9c16a937f0e1ca257b53d1781be0895 to your computer and use it in GitHub Desktop.
exception-future
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