Skip to content

Commit 7cbe7c5

Browse files
committed
---
yaml --- r: 4489 b: refs/heads/logging-alpha c: d1c4512 h: refs/heads/master i: 4487: 2e04978
1 parent fdd679f commit 7cbe7c5

6 files changed

Lines changed: 728 additions & 5 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
1414
refs/heads/gcs-nio: 283aeaf15efdcf3621eb6859f05e55ad7764375d
15-
refs/heads/logging-alpha: 5be58b3e91cade1d349014122484a29e254ba8f3
15+
refs/heads/logging-alpha: d1c45124dffd0a5a3bfdc2a4abe5c6483f32c295
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
1818
refs/tags/v0.1.2: 3eb3fe866ba22487686048f45d927b8c8638ea3f

branches/logging-alpha/gcloud-java-dns/src/main/java/com/google/gcloud/dns/Dns.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public interface Dns extends Service<DnsOptions> {
3636
* The fields of a project.
3737
*
3838
* <p>These values can be used to specify the fields to include in a partial response when calling
39-
* {@link Dns#getProjectInfo(ProjectOption...)}. Project ID is always returned, even if not
39+
* {@link Dns#getProject(ProjectOption...)}. Project ID is always returned, even if not
4040
* specified.
4141
*/
4242
enum ProjectField {
@@ -429,7 +429,7 @@ public static ChangeRequestListOption sortOrder(SortingOrder order) {
429429
* @see <a href="https://cloud.google.com/dns/api/v1/managedZones/create">Cloud DNS Managed Zones:
430430
* create</a>
431431
*/
432-
ZoneInfo create(ZoneInfo zoneInfo, ZoneOption... options);
432+
Zone create(ZoneInfo zoneInfo, ZoneOption... options);
433433

434434
/**
435435
* Returns the zone by the specified zone name. Returns {@code null} if the zone is not found. The
@@ -485,7 +485,7 @@ public static ChangeRequestListOption sortOrder(SortingOrder order) {
485485
* @throws DnsException upon failure
486486
* @see <a href="https://cloud.google.com/dns/api/v1/projects/get">Cloud DNS Projects: get</a>
487487
*/
488-
ProjectInfo getProjectInfo(ProjectOption... fields);
488+
ProjectInfo getProject(ProjectOption... fields);
489489

490490
/**
491491
* Submits a change request for the specified zone. The returned object contains the following

branches/logging-alpha/gcloud-java-dns/src/main/java/com/google/gcloud/dns/DnsException.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
package com.google.gcloud.dns;
1818

1919
import com.google.gcloud.BaseServiceException;
20+
import com.google.gcloud.RetryHelper.RetryHelperException;
21+
import com.google.gcloud.RetryHelper.RetryInterruptedException;
2022

2123
import java.io.IOException;
2224

@@ -31,5 +33,21 @@ public DnsException(IOException exception) {
3133
super(exception, true);
3234
}
3335

36+
public DnsException(int code, String message) {
37+
super(code, message, null, true);
38+
}
39+
40+
/**
41+
* Translate RetryHelperException to the DnsException that caused the error. This method will
42+
* always throw an exception.
43+
*
44+
* @throws DnsException when {@code ex} was caused by a {@code DnsException}
45+
* @throws RetryInterruptedException when {@code ex} is a {@code RetryInterruptedException}
46+
*/
47+
static DnsException translateAndThrow(RetryHelperException ex) {
48+
BaseServiceException.translateAndPropagateIfPossible(ex);
49+
throw new DnsException(UNKNOWN_CODE, ex.getMessage());
50+
}
51+
3452
//TODO(mderka) Add translation and retry functionality. Created issue #593.
3553
}

0 commit comments

Comments
 (0)