Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Dec 6, 2019
1 parent a48c2bc commit 5dcb722
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:7.0.1'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.1.1'
classpath 'com.palantir.baseline:gradle-baseline-java:2.39.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.40.1'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'com.palantir.metricschema:gradle-metric-schema:0.4.6'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum CatchThrowableInterceptor implements Interceptor {
public Response intercept(Chain chain) throws IOException {
try {
return chain.proceed(chain.request());
} catch (Throwable t) {
} catch (IOException | RuntimeException | Error t) {
if (t instanceof IOException) {
throw (IOException) t;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void record(String serviceName, String hostname, int port, int statusCode
try {
hostMetrics.get(
ImmutableServiceHostAndPort.of(serviceName, hostname, port)).record(statusCode, micros);
} catch (Exception e) {
} catch (RuntimeException e) {
log.warn("Unable to record metrics for host and port",
UnsafeArg.of("hostname", hostname),
SafeArg.of("port", port),
Expand All @@ -60,7 +60,7 @@ public void record(String serviceName, String hostname, int port, int statusCode
public void recordIoException(String serviceName, String hostname, int port) {
try {
hostMetrics.get(ImmutableServiceHostAndPort.of(serviceName, hostname, port)).recordIoException();
} catch (Exception e) {
} catch (RuntimeException e) {
log.warn("Unable to record IO exception for host and port",
UnsafeArg.of("hostname", hostname),
SafeArg.of("port", port),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.palantir.conjure.java.okhttp;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.io.CharStreams;
import com.palantir.conjure.java.api.errors.RemoteException;
Expand Down Expand Up @@ -61,7 +62,7 @@ public Optional<RemoteException> handle(Response response) {
try {
SerializableError serializableError = MAPPER.readValue(body, SerializableError.class);
return Optional.of(new RemoteException(serializableError, response.code()));
} catch (Exception e) {
} catch (JsonProcessingException | RuntimeException e) {
log.warn("Failed to deserialize JSON, could not deserialize SerializableError",
SafeArg.of("code", response.code()),
UnsafeArg.of("body", body),
Expand Down

0 comments on commit 5dcb722

Please sign in to comment.