未验证 提交 19614171 编写于 作者: J Jason Simmons 提交者: GitHub

Exit flutter_tester with an error code on an unhandled exception (#9932)

上级 be8819e2
......@@ -266,6 +266,15 @@ int main(int argc, char* argv[]) {
fml::MessageLoop::GetCurrent().RemoveTaskObserver(key);
};
settings.unhandled_exception_callback = [](const std::string& error,
const std::string& stack_trace) {
FML_LOG(ERROR) << "Unhandled exception" << std::endl
<< "Exception: " << error << std::endl
<< "Stack trace: " << stack_trace;
::exit(1);
return true;
};
return flutter::RunTester(
settings, command_line.HasOption(
flutter::FlagForSwitch(flutter::Switch::RunForever)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册