Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c31e8fbe authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Catch Runtime Exception thrown by ProtoOutputStream.flush() api" into main

parents adf48f86 22562190
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -578,8 +578,10 @@ public class BootReceiver extends BroadcastReceiver {
        } catch (FileNotFoundException ex) {
            Slog.e(TAG, "failed to open for write: " + tombstoneProtoWithHeaders, ex);
            throw ex;
        } catch (IOException ex) {
            Slog.e(TAG, "IO exception during write: " + tombstoneProtoWithHeaders, ex);
        } catch (RuntimeException ex) {
            // in the method ProtoOutputStream.flush(), it tries to catch IOException
            // then re-throw RuntimeException, so better catch it here.
            Slog.e(TAG, "failed to flush proto tombstone: " + tombstoneProtoWithHeaders, ex);
        } finally {
            // Remove the temporary file and unlock the lock.
            if (tombstoneProtoWithHeaders != null) {