Skip to content

Commit da92518

Browse files
fix: Async logging should not rethrow error in onFailure callback correction (#925)
* fix: Async logging should not rethrow error in onFailure callback correction * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1adf867 commit da92518

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you are using Maven without BOM, add this to your dependencies:
5151
If you are using Gradle 5.x or later, add this to your dependencies
5252

5353
```Groovy
54-
implementation platform('com.google.cloud:libraries-bom:25.0.0')
54+
implementation platform('com.google.cloud:libraries-bom:25.1.0')
5555
5656
implementation 'com.google.cloud:google-cloud-logging'
5757
```

‎google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ public void flush() {
882882
try {
883883
ApiFutures.allAsList(writesToFlush).get(FLUSH_WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
884884
} catch (InterruptedException | ExecutionException | TimeoutException e) {
885-
System.err.println("ERROR: flush failure: " + e);
885+
throw new RuntimeException(e);
886886
}
887887
}
888888

@@ -940,7 +940,7 @@ public void onSuccess(Void v) {
940940
public void onFailure(Throwable t) {
941941
try {
942942
Exception ex = t instanceof Exception ? (Exception) t : new Exception(t);
943-
throw new RuntimeException(ex);
943+
System.err.println("ERROR: onFailure exception: " + ex);
944944
} finally {
945945
removeFromPending();
946946
}

0 commit comments

Comments
 (0)