[flutter_tools] rethrow process exceptions as tool exit from gradle build (#64745)
The flutter tool is currently unable to detect missing permissions in gradle/gradle.bat that would cause a gradle build to fail via process exception. Rather than crashing and exiting, we can display the exception as an error message and tool exit. While linux/macOS are able to add the +x bit, this is not possible on windows with our current file system/OS API. These crashes represent a substantial amount of crash reporting, but are otherwise not actionable on our end.
This commit is contained in:
@@ -397,7 +397,7 @@ Future<void> buildGradleApp({
|
||||
environment: gradleEnvironment,
|
||||
mapFunction: consumeLog,
|
||||
);
|
||||
} on ProcessException catch(exception) {
|
||||
} on ProcessException catch (exception) {
|
||||
consumeLog(exception.toString());
|
||||
// Rethrow the exception if the error isn't handled by any of the
|
||||
// `localGradleErrors`.
|
||||
|
||||
Reference in New Issue
Block a user