Skip to content

Commit

Permalink
fix: Async logging should not rethrow error in onFailure callback cor…
Browse files Browse the repository at this point in the history
…rection (#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>
  • Loading branch information
losalex and gcf-owl-bot[bot] committed Mar 31, 2022
1 parent 1adf867 commit da92518
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -51,7 +51,7 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies

```Groovy
implementation platform('com.google.cloud:libraries-bom:25.0.0')
implementation platform('com.google.cloud:libraries-bom:25.1.0')
implementation 'com.google.cloud:google-cloud-logging'
```
Expand Down
Expand Up @@ -882,7 +882,7 @@ public void flush() {
try {
ApiFutures.allAsList(writesToFlush).get(FLUSH_WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
System.err.println("ERROR: flush failure: " + e);
throw new RuntimeException(e);
}
}

Expand Down Expand Up @@ -940,7 +940,7 @@ public void onSuccess(Void v) {
public void onFailure(Throwable t) {
try {
Exception ex = t instanceof Exception ? (Exception) t : new Exception(t);
throw new RuntimeException(ex);
System.err.println("ERROR: onFailure exception: " + ex);
} finally {
removeFromPending();
}
Expand Down

0 comments on commit da92518

Please sign in to comment.